-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdefault.nix
More file actions
62 lines (55 loc) · 1.42 KB
/
default.nix
File metadata and controls
62 lines (55 loc) · 1.42 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
{ pkgs ? import <nixpkgs> {}
, system ? builtins.currentSystem
, pythonPackages ? pkgs.python3Packages
, nixComponents ? pkgs.nixVersions.nixComponents_2_31
, forTest ? true
, forDev ? true
}:
{
nhgcEnv = pkgs.stdenv.mkDerivation {
name = "nix-heuristic-gc-env";
NIX_SYSTEM = system;
buildInputs = [
pythonPackages.humanfriendly
pythonPackages.pybind11
pythonPackages.setuptools
pythonPackages.rustworkx
nixComponents.nix-store
nixComponents.nix-main
pkgs.boost
] ++ pkgs.lib.optionals forTest [
pythonPackages.pytest
] ++ pkgs.lib.optionals forDev [
pythonPackages.ipython
pythonPackages.matplotlib
pkgs.less
];
};
pkg = pythonPackages.buildPythonPackage {
pname = "nix-heuristic-gc";
version = pkgs.lib.removeSuffix "\n" (builtins.readFile ./VERSION);
src = pkgs.nix-gitignore.gitignoreSource ["*.nix" "flake.lock"] ./.;
format = "setuptools";
NIX_SYSTEM = system;
buildInputs = [
pkgs.boost
nixComponents.nix-store
nixComponents.nix-main
pythonPackages.pybind11
pythonPackages.setuptools
];
nativeBuildInputs = [
pkgs.pkg-config
];
propagatedBuildInputs = [
pythonPackages.humanfriendly
pythonPackages.rustworkx
];
checkInputs = [
pythonPackages.pytestCheckHook
];
preCheck = ''
mv nix_heuristic_gc .nix_heuristic_gc
'';
};
}