tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
darwin purity: rustc
Jude Taylor
10 years ago
942cde61
7e4f41b1
+8
-5
1 changed file
expand all
collapse all
unified
split
pkgs
development
compilers
rustc
generic.nix
+8
-5
pkgs/development/compilers/rustc/generic.nix
···
84
84
inherit version;
85
85
inherit meta;
86
86
87
87
+
__impureHostDeps = [ "/usr/lib/libedit.3.dylib" ];
88
88
+
87
89
src = if isRelease then
88
90
fetchzip {
89
91
url = "http://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
···
107
109
installPhase = ''
108
110
mkdir -p "$out"
109
111
cp -r bin "$out/bin"
110
110
-
'' + (if stdenv.isLinux then ''
112
112
+
'' + stdenv.lib.optionalString stdenv.isLinux ''
111
113
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
112
114
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
113
115
"$out/bin/rustc"
114
114
-
'' else "");
116
116
+
'';
115
117
};
116
118
117
119
configureFlags = configureFlags
118
118
-
++ [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
119
119
-
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
120
120
+
++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ]
121
121
+
++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang";
120
122
121
123
inherit patches;
122
124
···
132
134
--replace /bin/echo "${coreutils}/bin/echo"
133
135
'';
134
136
135
135
-
buildInputs = [ which file perl curl python27 makeWrapper git valgrind procps ];
137
137
+
buildInputs = [ which file perl curl python27 makeWrapper git ]
138
138
+
++ stdenv.lib.optionals (!stdenv.isDarwin) [ procps valgrind ];
136
139
137
140
enableParallelBuilding = true;
138
141