summary refs log tree commit diff
path: root/pkgs/development/compilers/rust/rustc.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-10-18 14:05:39 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-11-05 17:10:53 -0500
commit4d4f94cde4d3806ca063ebf7e6ba448b0feae355 (patch)
treeab5b2aa5e33137b0832999a9a15d6740855c963f /pkgs/development/compilers/rust/rustc.nix
parent70d91badf57bbe4cd884e5da22b14662dd36009c (diff)
downloadnixlib-4d4f94cde4d3806ca063ebf7e6ba448b0feae355.tar
nixlib-4d4f94cde4d3806ca063ebf7e6ba448b0feae355.tar.gz
nixlib-4d4f94cde4d3806ca063ebf7e6ba448b0feae355.tar.bz2
nixlib-4d4f94cde4d3806ca063ebf7e6ba448b0feae355.tar.lz
nixlib-4d4f94cde4d3806ca063ebf7e6ba448b0feae355.tar.xz
nixlib-4d4f94cde4d3806ca063ebf7e6ba448b0feae355.tar.zst
nixlib-4d4f94cde4d3806ca063ebf7e6ba448b0feae355.zip
treewide: Depend on targetPackages.stdenv.cc.bintools instead of binutils directly
One should do this when needed executables at run time. It is more
honest and cross-friendly than refering to binutils directly, if one
neeeds the default binary tools for the target platform, rather than
binutils in particular.
Diffstat (limited to 'pkgs/development/compilers/rust/rustc.nix')
-rw-r--r--pkgs/development/compilers/rust/rustc.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index a113f5db4807..9f96d05c1163 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, fetchgit, fetchzip, file, python2, tzdata, procps
-, llvm, jemalloc, ncurses, darwin, binutils, rustPlatform, git, cmake, curl
+{ stdenv, targetPackages
+, fetchurl, fetchgit, fetchzip, file, python2, tzdata, procps
+, llvm, jemalloc, ncurses, darwin, rustPlatform, git, cmake, curl
 , which, libffi, gdb
 , version
 , forceBundledLLVM ? false
@@ -49,7 +50,7 @@ stdenv.mkDerivation {
                 ++ [ "--enable-local-rust" "--local-rust-root=${rustPlatform.rust.rustc}" "--enable-rpath" ]
                 ++ [ "--enable-vendor" "--disable-locked-deps" ]
                 # ++ [ "--jemalloc-root=${jemalloc}/lib"
-                ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${binutils.out}/bin/ar" ]
+                ++ [ "--default-linker=${targetPackages.stdenv.cc}/bin/cc" "--default-ar=${targetPackages.stdenv.cc.bintools}/bin/ar" ]
                 ++ optional (!forceBundledLLVM) [ "--enable-llvm-link-shared" ]
                 ++ optional (stdenv.cc.cc ? isClang) "--enable-clang"
                 ++ optional (targets != []) "--target=${target}"