Skip to content

Commit 9fa85b5

Browse files
committed
Nix
1 parent 1e00704 commit 9fa85b5

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-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

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

flake.nix

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
description = "Bindings between Numpy and Eigen using Boost.Python";
3+
4+
inputs = {
5+
flake-parts.url = "github:hercules-ci/flake-parts";
6+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
7+
};
8+
9+
outputs =
10+
inputs:
11+
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
12+
systems = inputs.nixpkgs.lib.systems.flakeExposed;
13+
perSystem =
14+
{ pkgs, self', ... }:
15+
{
16+
apps.default = {
17+
type = "app";
18+
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
19+
};
20+
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
21+
packages = {
22+
default = self'.packages.eigenpy;
23+
eigenpy = pkgs.python3Packages.eigenpy.overrideAttrs (_: {
24+
src = pkgs.lib.fileset.toSource {
25+
root = ./.;
26+
fileset = pkgs.lib.fileset.unions [
27+
./CMakeLists.txt
28+
./doc
29+
./include
30+
./package.xml
31+
./python
32+
./src
33+
./unittest
34+
];
35+
};
36+
});
37+
};
38+
};
39+
};
40+
}

0 commit comments

Comments
 (0)