diff options
author | Moritz Ulrich <moritz@tarn-vedra.de> | 2016-07-29 12:14:51 +0200 |
---|---|---|
committer | Moritz Ulrich <moritz@tarn-vedra.de> | 2016-08-10 21:16:37 +0200 |
commit | 12fe1549536ce10e445b8520dd64dde4cac43ce7 (patch) | |
tree | 3c26a632f569a2719d5852c4f1bb6919b508d64a | |
parent | 0f25add68da6b4e3f61e5f568d7cd6d49479e67a (diff) |
rust-bootstrap: Don't run patchelf on darwin.
-rw-r--r-- | pkgs/development/compilers/rust/bootstrap.nix | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix index bfc82c4317d73..56e19650579cc 100644 --- a/pkgs/development/compilers/rust/bootstrap.nix +++ b/pkgs/development/compilers/rust/bootstrap.nix @@ -24,6 +24,8 @@ let then "d59b5509e69c1cace20a57072e3b3ecefdbfd8c7e95657b0ff2ac10aa1dfebe6" else throw "missing boostrap hash for platform ${stdenv.system}"; + needsPatchelf = (stdenv.system == "i686-linux") || (stdenv.system == "x86_64-linux"); + src = fetchurl { url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz"; sha256 = bootstrapHash; @@ -46,9 +48,11 @@ rec { ./install.sh --prefix=$out \ --components=rustc,rust-std-${platform},rust-docs - patchelf \ - --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - "$out/bin/rustc" + ${if needsPatchelf then '' + patchelf \ + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + "$out/bin/rustc" + '' else ""} # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc # (or similar) here. It causes strange effects where rustc loads @@ -71,9 +75,11 @@ rec { ./install.sh --prefix=$out \ --components=cargo - patchelf \ - --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - "$out/bin/cargo" + ${if needsPatchelf then '' + patchelf \ + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + "$out/bin/cargo" + '' else ""} wrapProgram "$out/bin/cargo" \ --suffix PATH : "${rustc}/bin" |