From 9099db6c8423246018f4d6b1f4bc600f30593728 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Fri, 12 Jan 2024 00:45:22 -0800 Subject: [PATCH] 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. --- builtinModules/packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtinModules/packages.nix b/builtinModules/packages.nix index 1a38df1..68aaea6 100644 --- a/builtinModules/packages.nix +++ b/builtinModules/packages.nix @@ -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)))