about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/readTree/default.nix7
1 files changed, 7 insertions, 0 deletions
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;
 }