mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-02 17:09:09 +03:00
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"
|
||||
"__impureHostDeps" "__propagatedImpureHostDeps"
|
||||
"sandboxProfile" "propagatedSandboxProfile"])
|
||||
// (lib.optionalAttrs (!(attrs ? name))) {
|
||||
// (lib.optionalAttrs (!(attrs ? 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
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user