0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

rust: 1.46.0 -> 1.47.0

This commit is contained in:
Finn Behrens 2020-10-08 17:20:59 +02:00
parent 66a2958c25
commit 75ead1b43a
No known key found for this signature in database
GPG key ID: 8609A7B519E5E342
3 changed files with 24 additions and 18 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, makeWrapper, bash, curl, darwin
{ stdenv, makeWrapper, bash, curl, darwin, zlib
, version
, src
, platform
@ -42,17 +42,23 @@ rec {
./install.sh --prefix=$out \
--components=${installComponents}
${optionalString (stdenv.isLinux && bootstrapping) ''
${optionalString (stdenv.isLinux && bootstrapping) (''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/rustc"
'' + optionalString (stdenv.lib.versionAtLeast version "1.46")
# rustc bootstrap needs libz starting from 1.46
''
ln -s ${zlib}/lib/libz.so.1 $out/lib/libz.so.1
ln -s ${zlib}/lib/libz.so $out/lib/libz.so
'' + ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/rustdoc"
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/cargo"
''}
'')}
# Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
# (or similar) here. It causes strange effects where rustc loads