generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
overlay.nix
81 lines (65 loc) · 2.55 KB
/
overlay.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
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
{ inputs }:
final: prev:
let
lib' = prev.lib;
inherit (import ./lib/extend-lib.nix { inherit inputs; oldLib = prev.lib; }) lib;
inherit (lib) readByName autocallByName;
toplevelFiles = readByName ./pkgs/by-name;
pythonFiles = readByName ./python-packages/by-name;
in
{
inherit lib;
pythonPackagesExtensions = (prev.pythonPackagesExtensions or [ ]) ++ [
(py-final: py-prev:
let
scope = py-final.some-pkgs-py;
autocalled = (autocallByName scope ./python-packages/by-name);
extra = {
cppcolormap = py-final.toPythonModule (final.some-pkgs.cppcolormap.override {
enablePython = true;
python3Packages = py-final;
});
some-pkgs-faiss = py-final.toPythonModule (final.some-pkgs.faiss.override {
pythonSupport = true;
pythonPackages = py-final;
});
instant-ngp = scope.callPackage ./python-packages/by-name/in/instant-ngp/package.nix {
lark = py-final.lark or py-final.lark-parser;
};
quad-tree-loftr = scope.quad-tree-attention.feature-matching;
};
in
{
some-pkgs-py = final.recurseIntoAttrs (autocalled // extra // {
callPackage = py-final.newScope (py-final // final.some-pkgs // scope);
});
})
];
inherit (final.python3Packages) some-pkgs-py;
some-util = final.recurseIntoAttrs (final.callPackage ./some-util { });
some-pkgs =
final.recurseIntoAttrs
((autocallByName (final // final.some-pkgs) ./pkgs/by-name) //
{
some-pkgs-py = prev.recurseIntoAttrs final.python3Packages.some-pkgs-py;
callPackage = final.newScope (final // final.some-pkgs.some-pkgs-py // final.some-pkgs);
faiss = final.callPackage ./pkgs/by-name/fa/faiss {
pythonPackages = final.python3Packages;
swig = final.swig4;
};
});
some-datasets = final.recurseIntoAttrs (import ./datasets { lib = final.lib; pkgs = final; });
opencv4 = if final.config.cudaSupport then prev.opencv4.override { stdenv = final.cudaPackages.backendStdenv; } else prev.opencv4;
nixglhost = inputs.nix-gl-host.defaultPackage.${prev.system};
} // lib'.optionalAttrs (lib'.versionOlder lib'.version "23.11") {
# 2023-08-28: NUR still uses the 23.05 channel which doesen't handle pythonPackagesExtensions
python3 =
let
self = prev.python3.override {
packageOverrides = lib'.composeManyExtensions final.pythonPackagesExtensions;
inherit self;
};
in
self;
python3Packages = final.python3.pkgs;
}