make-derivation.nix: Float out unsafeDerivationToUntrackedOutpath

This commit is contained in:
Robert Hensing 2024-03-12 20:15:47 +01:00
parent 0ab7b23637
commit ba463e70e3

View File

@ -133,6 +133,13 @@ let
"sandboxProfile" "propagatedSandboxProfile"
];
# Turn a derivation into its outPath without a string context attached.
# See the comment at the usage site.
unsafeDerivationToUntrackedOutpath = drv:
if isDerivation drv
then builtins.unsafeDiscardStringContext drv.outPath
else drv;
makeDerivationArgument =
@ -242,13 +249,6 @@ let
separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux;
outputs' = outputs ++ optional separateDebugInfo' "debug";
# Turn a derivation into its outPath without a string context attached.
# See the comment at the usage site.
unsafeDerivationToUntrackedOutpath = drv:
if isDerivation drv
then builtins.unsafeDiscardStringContext drv.outPath
else drv;
noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
++ depsHostHost ++ depsHostHostPropagated
++ buildInputs ++ propagatedBuildInputs