make-derivation.nix: Return mkDerivation as an attribute

This commit is contained in:
Robert Hensing 2024-03-11 17:06:02 +01:00
parent ab56d3ac71
commit de516f6f13
3 changed files with 5 additions and 3 deletions

View file

@ -6,7 +6,7 @@
let
# N.B. Keep in sync with default arg for stdenv/generic.
defaultMkDerivationFromStdenv = import ./generic/make-derivation.nix { inherit lib config; };
defaultMkDerivationFromStdenv = stdenv: (import ./generic/make-derivation.nix { inherit lib config; } stdenv).mkDerivation;
# Low level function to help with overriding `mkDerivationFromStdenv`. One
# gives it the old stdenv arguments and a "continuation" function, and

View file

@ -52,7 +52,7 @@ argsStdenv@{ name ? "stdenv", preHook ? "", initialPath
, # The implementation of `mkDerivation`, parameterized with the final stdenv so we can tie the knot.
# This is convient to have as a parameter so the stdenv "adapters" work better
mkDerivationFromStdenv ? import ./make-derivation.nix { inherit lib config; }
mkDerivationFromStdenv ? stdenv: (import ./make-derivation.nix { inherit lib config; } stdenv).mkDerivation
}:
let

View file

@ -609,4 +609,6 @@ extendDerivation
(derivation (derivationArg // optionalAttrs envIsExportable checkedEnv));
in
mkDerivation
{
inherit mkDerivation;
}