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 wasmpkgs = {
11 inherit
12 lib
13 currentSystem
14 wasmpkgs
15 hostpkgs
16 ;
17 config = {
18 debug = false;
19 };
20 }
21 // lib.packagesFromDirectoryRecursive {
22 callPackage = lib.callPackageWith (wasmpkgs // hostpkgs);
23 directory = ./packages;
24 }
25 // (
26 let
27 isImpure = builtins ? currentSystem;
28 overrides = builtins.getEnv "DISTRO_OVERRIDES";
29 in
30 if isImpure && overrides != "" then
31 pipe overrides [
32 readDir
33 (filterAttrs (_name: type: type == "directory"))
34 (mapAttrs (name: _: /${overrides}/${name}/outputs))
35 (mapAttrs (
36 name: dir:
37 let
38 outputs = mapAttrs (output: _: /${dir}/${output}) (readDir dir);
39 in
40 outputs
41 // {
42 type = "derivation";
43 src = /${overrides}/${name}/src;
44 outPath = outputs.out;
45 }
46 ))
47 ]
48 else
49 { }
50 );
51in
52wasmpkgs