-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscope.nix
More file actions
38 lines (36 loc) · 977 Bytes
/
scope.nix
File metadata and controls
38 lines (36 loc) · 977 Bytes
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
# FIXME: This is one huge pile of mess that hasn't been maintained since, about, early 2024.
{
lib,
newScope,
recurseIntoAttrs,
withSomePkgsPy ? null,
}:
lib.makeScope newScope (
self:
let
python3Packages = lib.removeAttrs (self.callPackage ({ python3Packages }: python3Packages) { }) [
"override"
"callPackage"
];
some-pkgs-py =
if withSomePkgsPy != null then
withSomePkgsPy
else
(self.callPackage ./pythonScope.nix {
newScope = next: python3Packages.newScope (self // next);
withSomePkgs = self;
});
in
lib.autocallByName self.callPackage ./pkgs/by-name
// {
some-pkgs = self;
some-pkgs-py = recurseIntoAttrs some-pkgs-py;
some-util = recurseIntoAttrs (self.callPackage ./some-util { });
some-datasets = recurseIntoAttrs (
self.callPackage ./datasets {
inherit lib;
}
);
faiss = self.callPackage ./pkgs/by-name/fa/faiss { };
}
)