-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
58 lines (58 loc) · 1.69 KB
/
flake.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
{
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs";
};
purifix = {
url = "github:purifix/purifix";
};
purenix-base = {
url = "github:purenix-org/purenix-base/construct-package-sets";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
nix-eval-jobs = {
url = "github:nix-community/nix-eval-jobs";
};
nix-build-results = {
url = "github:considerate/nix-build-results";
};
purenix.url = "github:purenix-org/purenix";
};
outputs = inputs:
inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.purifix.overlay
inputs.purenix.overlay
inputs.nix-build-results.overlay
];
};
purenix-pkgs = pkgs.purifix {
src = inputs.purenix-base;
backends = [ pkgs.purenix ];
withDocs = false;
copyFiles = true;
};
all-packages = pkgs.linkFarmFromDrvs "purenix-pkgs" (builtins.attrValues purenix-pkgs);
package-set = pkgs.linkFarmFromDrvs "purenix-package-set" (builtins.attrValues purenix-pkgs.prelude.package-set);
drvs = pkgs.lib.mapAttrs (_: pkg: { inherit (pkg) drvPath version isLocal; }) purenix-pkgs.prelude.package-set;
in
{
inherit drvs;
packages = purenix-pkgs // { inherit all-packages package-set; };
apps = { };
devShells = {
default = pkgs.stdenv.mkDerivation {
name = "purenix-shell";
buildInputs = [
pkgs.python3
pkgs.nix-build-results
];
};
};
});
}