This repository has no description
1{
2 lib,
3 currentSystem,
4 hostpkgs ? { },
5}:
6
7let
8 inherit (lib) filterAttrs pipe;
9 inherit (builtins) mapAttrs readDir;
10 pkgs = {
11 inherit lib currentSystem;
12 config = {
13 debug = false;
14 };
15 }
16 // lib.packagesFromDirectoryRecursive {
17 callPackage = lib.callPackageWith (pkgs // hostpkgs);
18 directory = ./packages;
19 }
20 // (
21 let
22 isImpure = builtins ? currentSystem;
23 overrides = builtins.getEnv "DISTRO_OVERRIDES";
24 in
25 if isImpure && overrides != "" then
26 pipe overrides [
27 readDir
28 (filterAttrs (_name: type: type == "directory"))
29 (mapAttrs (name: _: /${overrides}/${name}/outputs))
30 (mapAttrs (
31 name: dir:
32 let
33 pkg = (mapAttrs (output: _: /${dir}/${output}) (readDir dir)) // {
34 type = "derivation";
35 src = /${overrides}/${name}/src;
36 outPath = pkg.out;
37 };
38 in
39 pkg
40 ))
41 ]
42 else
43 { }
44 );
45in
46pkgs