summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2016-08-09 08:23:27 +0200
committerMoritz Ulrich <moritz@tarn-vedra.de>2016-08-10 21:16:48 +0200
commit3324123eb7e4ee9cab9b53c9655971430f59ec2b (patch)
tree27e092397a7ace458bd59792c36d222976cea7ee /pkgs
parent86326cbf549205f3c9e2bc338cc69dc02239dc3a (diff)
downloadnixpkgs-3324123eb7e4ee9cab9b53c9655971430f59ec2b.tar
nixpkgs-3324123eb7e4ee9cab9b53c9655971430f59ec2b.tar.gz
nixpkgs-3324123eb7e4ee9cab9b53c9655971430f59ec2b.tar.bz2
nixpkgs-3324123eb7e4ee9cab9b53c9655971430f59ec2b.tar.lz
nixpkgs-3324123eb7e4ee9cab9b53c9655971430f59ec2b.tar.xz
nixpkgs-3324123eb7e4ee9cab9b53c9655971430f59ec2b.tar.zst
nixpkgs-3324123eb7e4ee9cab9b53c9655971430f59ec2b.zip
rustc-bootstrap: Use optionalString.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
index 7bbae9273b5..1ced865fc90 100644
--- a/pkgs/development/compilers/rust/bootstrap.nix
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -50,11 +50,11 @@ rec {
       ./install.sh --prefix=$out \
         --components=rustc,rust-std-${platform},rust-docs
 
-      ${if needsPatchelf then ''
+      ${optionalString needsPatchelf ''
         patchelf \
           --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
       # (or similar) here. It causes strange effects where rustc loads
@@ -77,11 +77,11 @@ rec {
       ./install.sh --prefix=$out \
         --components=cargo
 
-      ${if needsPatchelf then ''
+      ${optionalString needsPatchelf ''
         patchelf \
           --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
           "$out/bin/cargo"
-      '' else ""}
+      ''}
 
       wrapProgram "$out/bin/cargo" \
         --suffix PATH : "${rustc}/bin"