darwin purity: rustc
This commit is contained in:
parent
7e4f41b16f
commit
942cde614b
@ -84,6 +84,8 @@ stdenv.mkDerivation {
|
|||||||
inherit version;
|
inherit version;
|
||||||
inherit meta;
|
inherit meta;
|
||||||
|
|
||||||
|
__impureHostDeps = [ "/usr/lib/libedit.3.dylib" ];
|
||||||
|
|
||||||
src = if isRelease then
|
src = if isRelease then
|
||||||
fetchzip {
|
fetchzip {
|
||||||
url = "http://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
|
url = "http://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
|
||||||
@ -107,16 +109,16 @@ stdenv.mkDerivation {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
cp -r bin "$out/bin"
|
cp -r bin "$out/bin"
|
||||||
'' + (if stdenv.isLinux then ''
|
'' + stdenv.lib.optionalString stdenv.isLinux ''
|
||||||
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
|
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
|
||||||
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
|
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
|
||||||
"$out/bin/rustc"
|
"$out/bin/rustc"
|
||||||
'' else "");
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags = configureFlags
|
configureFlags = configureFlags
|
||||||
++ [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
|
++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ]
|
||||||
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
|
++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang";
|
||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
@ -132,7 +134,8 @@ stdenv.mkDerivation {
|
|||||||
--replace /bin/echo "${coreutils}/bin/echo"
|
--replace /bin/echo "${coreutils}/bin/echo"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ which file perl curl python27 makeWrapper git valgrind procps ];
|
buildInputs = [ which file perl curl python27 makeWrapper git ]
|
||||||
|
++ stdenv.lib.optionals (!stdenv.isDarwin) [ procps valgrind ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user