diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-01 11:40:12 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-01 11:40:12 +0100 |
commit | bf6d657e5dbcb5e39fda280ef7e86b2a7794ca86 (patch) | |
tree | 8eb035cbab19794f6415cc460fac7226f7a58afc /nixpkgs/lib/fixed-points.nix | |
parent | 66f707d69f1e423db5a35c2fe43b32781125a9af (diff) | |
parent | 09c1497ce5d4ed4a0edfdd44450d3048074cb300 (diff) | |
download | nixlib-bf6d657e5dbcb5e39fda280ef7e86b2a7794ca86.tar nixlib-bf6d657e5dbcb5e39fda280ef7e86b2a7794ca86.tar.gz nixlib-bf6d657e5dbcb5e39fda280ef7e86b2a7794ca86.tar.bz2 nixlib-bf6d657e5dbcb5e39fda280ef7e86b2a7794ca86.tar.lz nixlib-bf6d657e5dbcb5e39fda280ef7e86b2a7794ca86.tar.xz nixlib-bf6d657e5dbcb5e39fda280ef7e86b2a7794ca86.tar.zst nixlib-bf6d657e5dbcb5e39fda280ef7e86b2a7794ca86.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/lib/fixed-points.nix')
-rw-r--r-- | nixpkgs/lib/fixed-points.nix | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/nixpkgs/lib/fixed-points.nix b/nixpkgs/lib/fixed-points.nix index 3370b55a4ab9..3bd18fdd2a5a 100644 --- a/nixpkgs/lib/fixed-points.nix +++ b/nixpkgs/lib/fixed-points.nix @@ -145,6 +145,12 @@ rec { in fix g ``` + :::{.note} + The argument to the given fixed-point function after applying an overlay will *not* refer to its own return value, but rather to the value after evaluating the overlay function. + + The given fixed-point function is called with a separate argument than if it was evaluated with `lib.fix`. + ::: + :::{.example} # Extend a fixed-point function with an overlay @@ -230,13 +236,6 @@ rec { fix (extends (final: prev: { c = final.a + final.b; }) f) => { a = 1; b = 3; c = 4; } - - :::{.note} - The argument to the given fixed-point function after applying an overlay will *not* refer to its own return value, but rather to the value after evaluating the overlay function. - - The given fixed-point function is called with a separate argument than if it was evaluated with `lib.fix`. - The new argument - ::: */ extends = # The overlay to apply to the fixed-point function |