Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created September 27, 2018 18:21
Show Gist options
  • Save infinisil/87652bdde9466d9cb674b32f50bca8c7 to your computer and use it in GitHub Desktop.
Save infinisil/87652bdde9466d9cb674b32f50bca8c7 to your computer and use it in GitHub Desktop.
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix
index 06978d1067b..86c30014233 100644
--- a/pkgs/top-level/stage.nix
+++ b/pkgs/top-level/stage.nix
@@ -172,6 +172,13 @@ let
] ++ overlays ++ [
stdenvOverrides ]);
+ mapIt = path: attrs:
+ lib.mapAttrs (name: value:
+ builtins.trace (lib.concatStringsSep "." (path ++ [name]))
+ (if lib.isDerivation value then value
+ else if lib.isAttrs value then mapIt (path ++ [name]) value
+ else value)
+ ) attrs;
in
# Return the complete set of packages.
- lib.fix toFix
+ lib.fix (x: mapIt [] (toFix x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment