rust-bootstrap: Don't run patchelf on darwin.
This commit is contained in:
parent
0f25add68d
commit
12fe154953
@ -24,6 +24,8 @@ let
|
|||||||
then "d59b5509e69c1cace20a57072e3b3ecefdbfd8c7e95657b0ff2ac10aa1dfebe6"
|
then "d59b5509e69c1cace20a57072e3b3ecefdbfd8c7e95657b0ff2ac10aa1dfebe6"
|
||||||
else throw "missing boostrap hash for platform ${stdenv.system}";
|
else throw "missing boostrap hash for platform ${stdenv.system}";
|
||||||
|
|
||||||
|
needsPatchelf = (stdenv.system == "i686-linux") || (stdenv.system == "x86_64-linux");
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
|
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
|
||||||
sha256 = bootstrapHash;
|
sha256 = bootstrapHash;
|
||||||
@ -46,9 +48,11 @@ rec {
|
|||||||
./install.sh --prefix=$out \
|
./install.sh --prefix=$out \
|
||||||
--components=rustc,rust-std-${platform},rust-docs
|
--components=rustc,rust-std-${platform},rust-docs
|
||||||
|
|
||||||
patchelf \
|
${if needsPatchelf then ''
|
||||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
patchelf \
|
||||||
"$out/bin/rustc"
|
--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
|
# Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
|
||||||
# (or similar) here. It causes strange effects where rustc loads
|
# (or similar) here. It causes strange effects where rustc loads
|
||||||
@ -71,9 +75,11 @@ rec {
|
|||||||
./install.sh --prefix=$out \
|
./install.sh --prefix=$out \
|
||||||
--components=cargo
|
--components=cargo
|
||||||
|
|
||||||
patchelf \
|
${if needsPatchelf then ''
|
||||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
patchelf \
|
||||||
"$out/bin/cargo"
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
|
"$out/bin/cargo"
|
||||||
|
'' else ""}
|
||||||
|
|
||||||
wrapProgram "$out/bin/cargo" \
|
wrapProgram "$out/bin/cargo" \
|
||||||
--suffix PATH : "${rustc}/bin"
|
--suffix PATH : "${rustc}/bin"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user