make-derivation: only modify name when name is given
This preserves Nix’s native error handling of missing name: error: derivation name missing
This commit is contained in:
parent
59949aa55c
commit
c6f8f8d98d
@ -177,9 +177,9 @@ rec {
|
|||||||
"checkInputs" "installCheckInputs"
|
"checkInputs" "installCheckInputs"
|
||||||
"__impureHostDeps" "__propagatedImpureHostDeps"
|
"__impureHostDeps" "__propagatedImpureHostDeps"
|
||||||
"sandboxProfile" "propagatedSandboxProfile"])
|
"sandboxProfile" "propagatedSandboxProfile"])
|
||||||
// (lib.optionalAttrs (!(attrs ? name))) {
|
// (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
|
||||||
name = "${attrs.pname}-${attrs.version}";
|
name = "${attrs.pname}-${attrs.version}";
|
||||||
} // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)) {
|
} // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {
|
||||||
# Fixed-output derivations like source tarballs shouldn't get a host
|
# Fixed-output derivations like source tarballs shouldn't get a host
|
||||||
# suffix. But we have some weird ones with run-time deps that are
|
# suffix. But we have some weird ones with run-time deps that are
|
||||||
# just used for their side-affects. Those might as well since the
|
# just used for their side-affects. Those might as well since the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user