diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-28 12:44:10 -0600 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-28 12:44:10 -0600 |
commit | a56fe056ece1d7c0b384a08467408ded507573c7 (patch) | |
tree | 69159a0666ad6a95ff51a12e835cdbd96920492d /pkgs/stdenv/generic | |
parent | a9b7fa7634f509aa8332069867c220fe7546474b (diff) | |
download | nixpkgs-a56fe056ece1d7c0b384a08467408ded507573c7.tar nixpkgs-a56fe056ece1d7c0b384a08467408ded507573c7.tar.gz nixpkgs-a56fe056ece1d7c0b384a08467408ded507573c7.tar.bz2 nixpkgs-a56fe056ece1d7c0b384a08467408ded507573c7.tar.lz nixpkgs-a56fe056ece1d7c0b384a08467408ded507573c7.tar.xz nixpkgs-a56fe056ece1d7c0b384a08467408ded507573c7.tar.zst nixpkgs-a56fe056ece1d7c0b384a08467408ded507573c7.zip |
make-derivation: don’t add host suffix if there is no c compiler
Some trivial builders use the name attr to choose the exec name produced. For example nixos-install, nixos-install = makeProg { name = "nixos-install"; src = ./nixos-install.sh; nix = config.nix.package.out; path = makeBinPath [ nixos-enter ]; }; When cross compiling, this puts the prog in, /bin/nixos-install-powerpc64le-unknown-linux-gnu
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 2debf063c7e..aa1dcfe977d 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -96,7 +96,7 @@ rec { ++ depsHostHost ++ depsHostHostPropagated ++ buildInputs ++ propagatedBuildInputs ++ depsTargetTarget ++ depsTargetTargetPropagated) == 0; - runtimeSensativeIfFixedOutput = fixedOutputDrv -> !noNonNativeDeps; + dontAddHostSuffix = attrs ? outputHash && !noNonNativeDeps || stdenv.cc == null; supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ]; defaultHardeningFlags = if stdenv.targetPlatform.isMusl then supportedHardeningFlags @@ -187,7 +187,7 @@ rec { # 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. - (stdenv.hostPlatform != stdenv.buildPlatform && runtimeSensativeIfFixedOutput) + (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix) ("-" + stdenv.hostPlatform.config); builder = attrs.realBuilder or stdenv.shell; |