diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-01-28 11:38:30 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-01-28 11:38:30 -0500 |
commit | e2fe4c2d496764b4dbfa5af78d58741efe3ddfa4 (patch) | |
tree | b4b9531de22f643bd51d756ed046b22ca4f624f2 /pkgs/stdenv | |
parent | febda2b127ce34b6b408fe65a7c6b86923e97114 (diff) |
make-derivation: fix ordering of conditionals
cross should have higher precedence
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index f9792aaf01f43..1cb5639debe6c 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -177,14 +177,14 @@ rec { "checkInputs" "installCheckInputs" "__impureHostDeps" "__propagatedImpureHostDeps" "sandboxProfile" "propagatedSandboxProfile"]) - // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)) { + // (lib.optionalAttrs (name == "")) { + name = "${attrs.pname}-${attrs.version}"; + } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)) { # 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 # hash can't be the same. See #32986. name = "${if name != "" then name else "${attrs.pname}-${attrs.version}"}-${stdenv.hostPlatform.config}"; - } // (lib.optionalAttrs (name == "")) { - name = "${attrs.pname}-${attrs.version}"; } // { builder = attrs.realBuilder or stdenv.shell; args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; |