Skip to content

Commit bfa4e7d

Browse files
committed
nix: add build with eigen 5, ref #426
1 parent 7b1e4b9 commit bfa4e7d

File tree

3 files changed

+66
-27
lines changed

3 files changed

+66
-27
lines changed

.github/workflows/nix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
name: gepetto
2323
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
24-
- run: nix build -L
24+
- run: nix build -L .#proxsuite .#proxsuite-eigen_5
2525

2626
check:
2727
if: always()

flake.lock

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

flake.nix

Lines changed: 56 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,69 @@
1111
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
1212
systems = inputs.nixpkgs.lib.systems.flakeExposed;
1313
perSystem =
14-
{ pkgs, self', ... }:
1514
{
15+
inputs',
16+
pkgs,
17+
pkgs-eigen_5,
18+
self',
19+
system,
20+
...
21+
}:
22+
{
23+
_module.args =
24+
let
25+
overlay = final: prev: {
26+
proxsuite = prev.proxsuite.overrideAttrs {
27+
src = final.lib.fileset.toSource {
28+
root = ./.;
29+
fileset = final.lib.fileset.unions [
30+
./benchmark
31+
./bindings
32+
./cmake-external
33+
./CMakeLists.txt
34+
./doc
35+
./examples
36+
./include
37+
./package.xml
38+
./test
39+
];
40+
};
41+
postPatch = "";
42+
};
43+
};
44+
in
45+
{
46+
pkgs = import inputs.nixpkgs {
47+
inherit system;
48+
overlays = [ overlay ];
49+
};
50+
pkgs-eigen_5 = import inputs.nixpkgs {
51+
inherit system;
52+
overlays = [
53+
(final: prev: {
54+
eigen = prev.eigen.overrideAttrs (super: rec {
55+
version = "5.0.0";
56+
src = final.fetchFromGitLab {
57+
inherit (super.src) owner repo;
58+
tag = version;
59+
hash = "sha256-L1KUFZsaibC/FD6abTXrT3pvaFhbYnw+GaWsxM2gaxM=";
60+
};
61+
patches = [ ];
62+
postPatch = "";
63+
});
64+
})
65+
overlay
66+
];
67+
};
68+
};
1669
apps.default = {
1770
type = "app";
1871
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
1972
};
2073
packages = {
2174
default = self'.packages.proxsuite;
22-
proxsuite = pkgs.python3Packages.proxsuite.overrideAttrs {
23-
src = pkgs.lib.fileset.toSource {
24-
root = ./.;
25-
fileset = pkgs.lib.fileset.unions [
26-
./benchmark
27-
./bindings
28-
./cmake-external
29-
./CMakeLists.txt
30-
./doc
31-
./examples
32-
./include
33-
./package.xml
34-
./test
35-
];
36-
};
37-
};
75+
proxsuite = pkgs.python3Packages.proxsuite;
76+
proxsuite-eigen_5 = pkgs-eigen_5.python3Packages.proxsuite;
3877
};
3978
};
4079
};

0 commit comments

Comments
 (0)