rustc-bootstrap: Use optionalString.
This commit is contained in:
parent
86326cbf54
commit
3324123eb7
@ -50,11 +50,11 @@ rec {
|
|||||||
./install.sh --prefix=$out \
|
./install.sh --prefix=$out \
|
||||||
--components=rustc,rust-std-${platform},rust-docs
|
--components=rustc,rust-std-${platform},rust-docs
|
||||||
|
|
||||||
${if needsPatchelf then ''
|
${optionalString needsPatchelf ''
|
||||||
patchelf \
|
patchelf \
|
||||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
"$out/bin/rustc"
|
"$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
|
||||||
@ -77,11 +77,11 @@ rec {
|
|||||||
./install.sh --prefix=$out \
|
./install.sh --prefix=$out \
|
||||||
--components=cargo
|
--components=cargo
|
||||||
|
|
||||||
${if needsPatchelf then ''
|
${optionalString needsPatchelf ''
|
||||||
patchelf \
|
patchelf \
|
||||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
"$out/bin/cargo"
|
"$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