about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--default.nix6
-rw-r--r--nix/readTree/default.nix7
2 files changed, 8 insertions, 5 deletions
diff --git a/default.nix b/default.nix
index 245e76e30403..991010c5ff04 100644
--- a/default.nix
+++ b/default.nix
@@ -10,10 +10,6 @@ let
     filter
     ;
 
-  # This definition of fix is identical to <nixpkgs>.lib.fix, but the global
-  # package set is not available here.
-  fix = f: let x = f x; in x;
-
   readTree = import ./nix/readTree {};
 
   # Disallow access to //users from other depot parts.
@@ -97,7 +93,7 @@ let
            (node.meta.targets or []))
     else [];
 
-in fix(self: (readDepot {
+in readTree.fix(self: (readDepot {
   depot = self;
 
   # Pass third_party as 'pkgs' (for compatibility with external
diff --git a/nix/readTree/default.nix b/nix/readTree/default.nix
index e34c4f39f1f1..3738a6cea61e 100644
--- a/nix/readTree/default.nix
+++ b/nix/readTree/default.nix
@@ -169,4 +169,11 @@ in {
         '';
       };
     };
+
+  # This definition of fix is identical to <nixpkgs>.lib.fix, but is
+  # provided here for cases where readTree is used before nixpkgs can
+  # be imported.
+  #
+  # It is often required to create the args attribute set.
+  fix = f: let x = f x; in x;
 }