diff options
author | Vincent Ambo <mail@tazj.in> | 2021-11-23T11·39+0300 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-11-23T12·02+0000 |
commit | a2be05faa4043c225581090846c52718812fac8f (patch) | |
tree | ceecaa0075208a4b026866f8b2700b907469a9cc /nix/readTree | |
parent | 18c248547dd5dc0426a4a72ad90baed719f92c04 (diff) |
refactor(readTree): Move copy of 'fix' into readTree r/3084
This is often used when bootstrapping a repository with readTree, before lib is available. Having this definition in readTree is more convenient than copy&pasting it around to callsites. Change-Id: I6d5d27ed142bea704843fe289ad2674be8c4d360
Diffstat (limited to '')
-rw-r--r-- | nix/readTree/default.nix | 7 |
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; } |