-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
62 lines (55 loc) · 1.37 KB
/
default.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
{
pkgs ? import <nixpkgs> { },
lib ? pkgs.lib,
callPackage ? pkgs.callPackage,
}:
# The main packages
(lib.packagesFromDirectoryRecursive {
directory = ./pkgs/by-name;
callPackage = callPackage;
})
# Extras
// {
lib =
let
filelist = lib.filesystem.listFilesRecursive ./lib;
newSet = lib.foldr lib.recursiveUpdate { } (map (x: import x { inherit pkgs; }) filelist);
final = newSet;
in
final
# or:
# lib.extend (final: prev: newSet);
;
modules =
(lib.packagesFromDirectoryRecursive {
directory = ./modules;
callPackage = (x: _a: import x);
})
// {
all = {
imports = lib.filesystem.listFilesRecursive ./modules;
};
};
qemuImages = pkgs.recurseIntoAttrs (callPackage ./pkgs/qemu-images { });
python3Packages = lib.makeScope pkgs.python3Packages.newScope (
self:
pkgs.recurseIntoAttrs (
(lib.packagesFromDirectoryRecursive {
directory = ./pkgs/python3-packages;
callPackage = self.callPackage;
})
)
);
lispPackages = pkgs.recurseIntoAttrs (
lib.packagesFromDirectoryRecursive {
directory = ./pkgs/lisp-packages;
callPackage = callPackage;
}
);
emacsPackages = pkgs.recurseIntoAttrs (
lib.packagesFromDirectoryRecursive {
directory = ./pkgs/emacs-packages;
callPackage = pkgs.emacs.pkgs.callPackage;
}
);
}