-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathflake.nix
More file actions
81 lines (79 loc) · 2.3 KB
/
flake.nix
File metadata and controls
81 lines (79 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
description = "Advanced Proximal Optimization Toolbox";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
{ self, lib, ... }:
{
systems = inputs.nixpkgs.lib.systems.flakeExposed;
flake.overlays = {
default = final: prev: {
proxsuite = prev.proxsuite.overrideAttrs {
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./benchmark
./bindings
./cmake-external
./CMakeLists.txt
./doc
./examples
./include
./package.xml
./test
];
};
postPatch = "";
};
};
eigen_5 = final: prev: {
eigen = final.eigen_5;
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(python-final: python-prev: {
scipy = python-prev.scipy.overrideAttrs {
# broken on linux arm
doInstallCheck = false;
};
})
];
};
};
perSystem =
{
pkgs,
pkgs-eigen_5,
self',
system,
...
}:
{
_module.args = {
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
pkgs-eigen_5 = import inputs.nixpkgs {
inherit system;
overlays = [
self.overlays.eigen_5
self.overlays.default
];
};
};
apps.default = {
type = "app";
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
};
packages = {
default = self'.packages.proxsuite;
proxsuite = pkgs.python3Packages.proxsuite;
proxsuite-eigen_5 = pkgs-eigen_5.python3Packages.proxsuite;
};
};
}
);
}