-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverlays.nix
39 lines (37 loc) · 1.04 KB
/
overlays.nix
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
{
lib,
nix-filter,
its-data-overlay,
model-overlay,
}:
rec {
default = its-jointprobability;
# add the python library and its related dependencies
python-lib = lib.composeManyExtensions [
its-data-overlay
model-overlay
(final: prev: {
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(python-final: python-prev: {
its-jointprobability = python-final.callPackage ./python-lib.nix { inherit nix-filter; };
its-jointprobability-with-oputuna = python-final.callPackage ./python-lib.nix {
inherit nix-filter;
withOptuna = true;
};
})
];
})
];
# add the standalone python application (without also adding the python
# library or additional dependencies)
its-jointprobability = (
final: prev:
let
# add the python library to python, without exposing it to the outside
py-pkgs = (final.extend python-lib).python3Packages;
in
{
its-jointprobability = py-pkgs.callPackage ./package.nix { };
}
);
}