Loading pkgs/top-level/splice.nix +34 −35 Original line number Diff line number Diff line Loading @@ -31,11 +31,11 @@ let # The same pkgs sets one probably intends // inputs.buildHost // inputs.hostTarget; merge = name: { inherit name; value = # perf: mapAttrs defers merge calls until a key is selected, avoiding # ~60k eager closures that listToAttrs+map would create. merge = name: defaultValue: let defaultValue = mash.${name}; # `or {}` is for the non-derivation attsert splicing case, where `{}` is the identity. value' = mapCrossIndex (x: x.${name} or { }) inputs; Loading Loading @@ -65,9 +65,8 @@ let # Don't be fancy about non-derivations. But we could have used used # `__functor__` for functions instead. defaultValue; }; in lib.listToAttrs (map merge (lib.attrNames mash)); builtins.mapAttrs merge mash; splicePackages = { Loading Loading
pkgs/top-level/splice.nix +34 −35 Original line number Diff line number Diff line Loading @@ -31,11 +31,11 @@ let # The same pkgs sets one probably intends // inputs.buildHost // inputs.hostTarget; merge = name: { inherit name; value = # perf: mapAttrs defers merge calls until a key is selected, avoiding # ~60k eager closures that listToAttrs+map would create. merge = name: defaultValue: let defaultValue = mash.${name}; # `or {}` is for the non-derivation attsert splicing case, where `{}` is the identity. value' = mapCrossIndex (x: x.${name} or { }) inputs; Loading Loading @@ -65,9 +65,8 @@ let # Don't be fancy about non-derivations. But we could have used used # `__functor__` for functions instead. defaultValue; }; in lib.listToAttrs (map merge (lib.attrNames mash)); builtins.mapAttrs merge mash; splicePackages = { Loading