diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-10-18 14:05:39 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-11-05 17:10:53 -0500 |
commit | 4d4f94cde4d3806ca063ebf7e6ba448b0feae355 (patch) | |
tree | ab5b2aa5e33137b0832999a9a15d6740855c963f /pkgs/development/compilers/ghc | |
parent | 70d91badf57bbe4cd884e5da22b14662dd36009c (diff) | |
download | nixlib-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/ghc')
-rw-r--r-- | pkgs/development/compilers/ghc/7.10.2.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/7.10.3.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/7.6.3.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.0.2.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.2.1.nix | 16 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/head.nix | 4 |
6 files changed, 17 insertions, 17 deletions
diff --git a/pkgs/development/compilers/ghc/7.10.2.nix b/pkgs/development/compilers/ghc/7.10.2.nix index 863f904e4e96..51274dd60598 100644 --- a/pkgs/development/compilers/ghc/7.10.2.nix +++ b/pkgs/development/compilers/ghc/7.10.2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils +{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils , libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour # If enabled GHC will be build with the GPL-free but slower integer-simple @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i + sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i done ''; diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix index eb8f1dddd19b..d573a22e0ae8 100644 --- a/pkgs/development/compilers/ghc/7.10.3.nix +++ b/pkgs/development/compilers/ghc/7.10.3.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils +{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils , libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour # If enabled GHC will be build with the GPL-free but slower integer-simple @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i + sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i done ''; diff --git a/pkgs/development/compilers/ghc/7.6.3.nix b/pkgs/development/compilers/ghc/7.6.3.nix index 5f951936046f..fde4ca2aa37d 100644 --- a/pkgs/development/compilers/ghc/7.6.3.nix +++ b/pkgs/development/compilers/ghc/7.6.3.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ghc, perl, ncurses, binutils, libiconv +{ stdenv, fetchurl, ghc, perl, ncurses, libiconv # If enabled GHC will be build with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix index e50a8df7352d..d475e3438b4b 100644 --- a/pkgs/development/compilers/ghc/8.0.2.nix +++ b/pkgs/development/compilers/ghc/8.0.2.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils +{ stdenv, lib, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils , hscolour, patchutils, sphinx # If enabled GHC will be build with the GPL-free but slower integer-simple @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i + sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i done ''; diff --git a/pkgs/development/compilers/ghc/8.2.1.nix b/pkgs/development/compilers/ghc/8.2.1.nix index dde56df81313..bcc801c98ea5 100644 --- a/pkgs/development/compilers/ghc/8.2.1.nix +++ b/pkgs/development/compilers/ghc/8.2.1.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, bootPkgs, perl, ncurses, libiconv, binutils, coreutils +{ stdenv, lib, fetchurl, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils , autoconf, automake, happy, alex, python3, sphinx, hscolour , buildPlatform, targetPlatform , selfPkgs, cross ? null @@ -66,7 +66,7 @@ in stdenv.mkDerivation (rec { for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i + sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i done ''; @@ -97,23 +97,23 @@ in stdenv.mkDerivation (rec { configureFlags = [ "CC=${stdenv.ccCross}/bin/${cross.config}-cc" - "LD=${stdenv.binutils}/bin/${cross.config}-ld" - "AR=${stdenv.binutils}/bin/${cross.config}-ar" - "NM=${stdenv.binutils}/bin/${cross.config}-nm" - "RANLIB=${stdenv.binutils}/bin/${cross.config}-ranlib" + "LD=${targetPackages.stdenv.cc.bintools}/bin/${cross.config}-ld" + "AR=${targetPackages.stdenv.cc.bintools}/bin/${cross.config}-ar" + "NM=${targetPackages.stdenv.cc.bintools}/bin/${cross.config}-nm" + "RANLIB=${targetPackages.stdenv.cc.bintools}/bin/${cross.config}-ranlib" "--target=${cross.config}" "--enable-bootstrap-with-devel-snapshot" ] ++ # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space"; - buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutils ]; + buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.targetPackages.stdenv.cc.bintools ]; dontSetConfigureCross = true; passthru = { inherit bootPkgs cross; cc = "${stdenv.ccCross}/bin/${cross.config}-cc"; - ld = "${stdenv.binutils}/bin/${cross.config}-ld"; + ld = "${stdenv.targetPackages.stdenv.cc.bintools}/bin/${cross.config}-ld"; }; }) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 362b4895b7e3..92ba3f6a46ed 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchgit, bootPkgs, perl, ncurses, libiconv, binutils, coreutils +{ stdenv, lib, fetchgit, bootPkgs, perl, ncurses, libiconv, targetPackages, coreutils , autoconf, automake, happy, alex, python3, buildPlatform, targetPlatform , selfPkgs, cross ? null @@ -71,7 +71,7 @@ in stdenv.mkDerivation (rec { for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ binutils coreutils ]}"' $i + sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i done ''; |