Skip to content

Commit a84f4a6

Browse files
committed
Nix
1 parent 0b594a0 commit a84f4a6

File tree

3 files changed

+124
-0
lines changed

3 files changed

+124
-0
lines changed

.github/workflows/nix.yml

Lines changed: 19 additions & 0 deletions
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

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
description = "Fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives.";
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/337942
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.pinocchio;
25+
python = pkgs.python3.withPackages (_: [ self'.packages.default ]);
26+
pinocchio = pkgs.python3Packages.pinocchio.overrideAttrs (_: {
27+
src = pkgs.lib.fileset.toSource {
28+
root = ./.;
29+
fileset = pkgs.lib.fileset.unions [
30+
./benchmark
31+
./bindings
32+
./CMakeLists.txt
33+
./doc
34+
./examples
35+
./include
36+
./models
37+
./package.xml
38+
./sources.cmake
39+
./src
40+
./unittest
41+
./utils
42+
];
43+
};
44+
});
45+
};
46+
};
47+
};
48+
}

0 commit comments

Comments
 (0)