@@ -444,21 +444,20 @@ rec {
444444
445445 `toExtension` is the `toFunction` for extending functions (a.k.a. extensions or overlays).
446446 It converts a non-function or a single-argument function to an extending function,
447- while returning a double -argument function as-is.
447+ while returning a two -argument function as-is.
448448
449- That is, it takes one of `x`, `prev: x`, or `final: prev: x`,
450- and returns `final: prev: x`, where `x` is not a function.
449+ That is, it takes a value of the shape `x`, `prev: x`, or `final: prev: x`,
450+ and returns `final: prev: x`, assuming `x` is not a function.
451451
452- This function is extracted from the implementation of
453- the fixed-point arguments support of `stdenv.mkDerivation` .
452+ This function takes care of the input to `stdenv.mkDerivation`'s
453+ `overrideAttrs` function .
454454 It bridges the gap between `<pkg>.overrideAttrs`
455- before and after the overlay-style support,
456- as well as `config.packageOverrides` and `config.overlays` in `pkgs`.
455+ before and after the overlay-style support.
457456
458457 # Inputs
459458
460459 `f`
461- : The function or non-function to convert to an extending function.
460+ : The function or value to convert to an extending function.
462461
463462 # Type
464463
@@ -509,6 +508,6 @@ rec {
509508 # f is (prev: { ... })
510509 fPrev
511510 else
512- # f is { ... }
511+ # f is not a function; probably { ... }
513512 final : prev : f ;
514513}
0 commit comments