about summary refs log tree commit diff
path: root/pkgs/development/tools/rust/rustup/default.nix
diff options
context:
space:
mode:
authorLeon Isenberg <ljli@users.noreply.github.com>2017-10-29 21:32:40 +0100
committerLeon Isenberg <ljli@users.noreply.github.com>2017-10-29 21:40:56 +0100
commitcbe326feb88c380dbee2a9b500fd32a307f71cf6 (patch)
tree6a9c857234077ecf8d83dafe7eb4260521acab6f /pkgs/development/tools/rust/rustup/default.nix
parentaf65f13e6803a97373cc3e749f64a77a83aa6d7f (diff)
rustup: Patch rustup to patchelf binaries
Diffstat (limited to 'pkgs/development/tools/rust/rustup/default.nix')
-rw-r--r--pkgs/development/tools/rust/rustup/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/development/tools/rust/rustup/default.nix b/pkgs/development/tools/rust/rustup/default.nix
index 65599ad8d18fb..3106048e6749f 100644
--- a/pkgs/development/tools/rust/rustup/default.nix
+++ b/pkgs/development/tools/rust/rustup/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, runCommand
+{ stdenv, lib, runCommand, patchelf
 , fetchFromGitHub, rustPlatform
 , pkgconfig, curl, Security }:
 
@@ -24,9 +24,11 @@ rustPlatform.buildRustPackage rec {
   cargoBuildFlags = [ "--features no-self-update" ];
 
   patches = lib.optionals stdenv.isLinux [
-    (runCommand "0001-use-hardcoded-dynamic-linker.patch" { CC=stdenv.cc; } ''
+    (runCommand "0001-dynamically-patchelf-binaries.patch" { CC=stdenv.cc; patchelf = patchelf; } ''
        export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
-       substituteAll ${./0001-use-hardcoded-dynamic-linker.patch} $out
+       substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
+         --subst-var patchelf \
+         --subst-var dynamicLinker
     '')
   ];