Skip to content

Commit 325645b

Browse files
authored
Merge pull request #22 from nim65s/nix
Nix: init
2 parents d55cec0 + b8ee717 commit 325645b

File tree

3 files changed

+133
-0
lines changed

3 files changed

+133
-0
lines changed

.github/workflows/nix.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "CI - Nix"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
nix:
13+
runs-on: "${{ matrix.os }}-latest"
14+
strategy:
15+
matrix:
16+
os: [ubuntu, macos]
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: cachix/install-nix-action@v31
20+
- uses: cachix/cachix-action@v16
21+
with:
22+
name: gepetto
23+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
24+
- run: nix build -L
25+
26+
check:
27+
if: always()
28+
name: check-macos-linux-nix
29+
30+
needs:
31+
- nix
32+
33+
runs-on: Ubuntu-latest
34+
35+
steps:
36+
- name: Decide whether the needed jobs succeeded or failed
37+
uses: re-actors/alls-green@release/v1
38+
with:
39+
jobs: ${{ toJSON(needs) }}

flake.lock

Lines changed: 61 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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
description = "Bindings between Numpy and Eigen using nanobind";
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+
packages = {
17+
default = self'.packages.nanoeigenpy;
18+
nanoeigenpy = pkgs.python3Packages.nanoeigenpy.overrideAttrs (_: {
19+
src = pkgs.lib.fileset.toSource {
20+
root = ./.;
21+
fileset = pkgs.lib.fileset.unions [
22+
./CMakeLists.txt
23+
./include
24+
./package.xml
25+
./src
26+
./tests
27+
];
28+
};
29+
});
30+
};
31+
};
32+
};
33+
}

0 commit comments

Comments
 (0)