Skip to content

Commit

Permalink
Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Aug 28, 2024
1 parent 3ad0ce4 commit 7cb2914
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "CI - Nix"

on:
push:

jobs:
nix:
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: [ubuntu, macos]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: cachix/cachix-action@v15
with:
name: gepetto
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build -L
57 changes: 57 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
description = "Set of robot URDFs for benchmarking and developed examples.";

inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
#nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# use gepetto fork until https://github.com/NixOS/nixpkgs/pull/324018
nixpkgs.url = "github:gepetto/nixpkgs";
};

outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
perSystem =
{ pkgs, self', ... }:
{
apps.default = {
type = "app";
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
};
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
packages = {
default = self'.packages.example-robot-data;
python = pkgs.python3.withPackages (_: [ self'.packages.default ]);
example-robot-data = pkgs.python3Packages.example-robot-data.overrideAttrs (_: {
patches = []; # remove nixpkgs patch for #217
src = pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.unions [
./CMakeLists.txt
./include
./package.xml
./python
./robots
./unittest
];
};
});
};
};
};
}

0 comments on commit 7cb2914

Please sign in to comment.