Skip to content

Commit 7cb2914

Browse files
committed
Nix
1 parent 3ad0ce4 commit 7cb2914

File tree

3 files changed

+119
-0
lines changed

3 files changed

+119
-0
lines changed

.github/workflows/nix.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "CI - Nix"
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
nix:
8+
runs-on: "${{ matrix.os }}-latest"
9+
strategy:
10+
matrix:
11+
os: [ubuntu, macos]
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: cachix/install-nix-action@v27
15+
- uses: cachix/cachix-action@v15
16+
with:
17+
name: gepetto
18+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
19+
- run: nix build -L

flake.lock

+57
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
description = "Set of robot URDFs for benchmarking and developed examples.";
3+
4+
inputs = {
5+
flake-parts.url = "github:hercules-ci/flake-parts";
6+
#nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
7+
# use gepetto fork until https://github.com/NixOS/nixpkgs/pull/324018
8+
nixpkgs.url = "github:gepetto/nixpkgs";
9+
};
10+
11+
outputs =
12+
inputs:
13+
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
14+
systems = inputs.nixpkgs.lib.systems.flakeExposed;
15+
perSystem =
16+
{ pkgs, self', ... }:
17+
{
18+
apps.default = {
19+
type = "app";
20+
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
21+
};
22+
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
23+
packages = {
24+
default = self'.packages.example-robot-data;
25+
python = pkgs.python3.withPackages (_: [ self'.packages.default ]);
26+
example-robot-data = pkgs.python3Packages.example-robot-data.overrideAttrs (_: {
27+
patches = []; # remove nixpkgs patch for #217
28+
src = pkgs.lib.fileset.toSource {
29+
root = ./.;
30+
fileset = pkgs.lib.fileset.unions [
31+
./CMakeLists.txt
32+
./include
33+
./package.xml
34+
./python
35+
./robots
36+
./unittest
37+
];
38+
};
39+
});
40+
};
41+
};
42+
};
43+
}

0 commit comments

Comments
 (0)