1
1
forked from extern/flakelight

Avoid evaluating packages twice

Previously, the packages outputs would be evalutated using callPackage
on the package set, but the package set already contains the package. If
another package depends on it, the dependency would be the version from
the package set. By grabbing the packages from the package set, each
package only needs to be evaluated once.
This commit is contained in:
Archit Gupta 2024-01-12 00:45:22 -08:00
parent 99d8fc8a85
commit 9099db6c84

View File

@ -75,7 +75,8 @@ in
outputs = rec {
packages = genSystems (pkgs:
filterAttrs (_: supportedSystem pkgs) (genPkgs pkgs));
filterAttrs (_: supportedSystem pkgs)
(mapAttrs (k: _: pkgs.${k}) config.packages));
checks = mapAttrs
(_: mapAttrs' (n: nameValuePair ("packages-" + n)))