treewide: Depend on stdenv.cc.bintools instead of binutils directly

One should do this when needed executables at build time. It is more
honest and cross-friendly than refering to binutils directly.
This commit is contained in:
John Ericson 2017-10-10 19:01:42 -04:00
parent 5ae8f18f4d
commit 70d91badf5
8 changed files with 19 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{ config, stdenv, fetchgit, makeWrapper, gnome3, at_spi2_core, libcxx, { config, stdenv, fetchgit, makeWrapper, gnome3, at_spi2_core, libcxx,
boost, epoxy, cmake, aspell, llvmPackages, libgit2, pkgconfig, pcre, boost, epoxy, cmake, aspell, llvmPackages, libgit2, pkgconfig, pcre,
libXdmcp, libxkbcommon, libpthreadstubs, wrapGAppsHook, aspellDicts, libXdmcp, libxkbcommon, libpthreadstubs, wrapGAppsHook, aspellDicts,
coreutils, glibc, dbus_libs, openssl, libxml2, gnumake, binutils, ctags }: coreutils, glibc, dbus_libs, openssl, libxml2, gnumake, ctags }:
with stdenv.lib; with stdenv.lib;
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
mv $out/bin/juci $out/bin/.juci mv $out/bin/juci $out/bin/.juci
makeWrapper "$out/bin/.juci" "$out/bin/juci" \ makeWrapper "$out/bin/.juci" "$out/bin/juci" \
--set PATH "${stdenv.lib.makeBinPath [ ctags coreutils llvmPackages.clang.cc cmake gnumake binutils llvmPackages.clang ]}" \ --set PATH "${stdenv.lib.makeBinPath [ ctags coreutils llvmPackages.clang.cc cmake gnumake llvmPackages.clang.bintools llvmPackages.clang ]}" \
--set NO_AT_BRIDGE 1 \ --set NO_AT_BRIDGE 1 \
--set ASPELL_CONF "dict-dir ${aspellDicts.en}/lib/aspell" --set ASPELL_CONF "dict-dir ${aspellDicts.en}/lib/aspell"
''; '';

View File

@ -97,6 +97,11 @@ stdenv.mkDerivation {
outputs = [ "out" "man" ]; outputs = [ "out" "man" ];
passthru = { passthru = {
# "cc" is the generic name for a C compiler, but there is no one for package
# providing the linker and related tools. The two we use now are GNU
# Binutils, and Apple's "cctools"; "binutils" as an attempt to find an
# unused middle-ground name that evokes both.
bintools = binutils_bin;
inherit libc nativeTools nativeLibc nativePrefix isGNU isClang default_cxx_stdlib_compile inherit libc nativeTools nativeLibc nativePrefix isGNU isClang default_cxx_stdlib_compile
prefix; prefix;

View File

@ -1,5 +1,7 @@
{ fetchgit, pkgconfig, gettext, runCommand, makeWrapper { fetchgit, pkgconfig, gettext, runCommand, makeWrapper
, elfutils, kernel, gnumake, python2, pythonPackages, binutils }: , elfutils, kernel, gnumake, python2, pythonPackages
}:
let let
## fetchgit info ## fetchgit info
url = git://sourceware.org/git/systemtap.git; url = git://sourceware.org/git/systemtap.git;
@ -55,5 +57,5 @@ in runCommand "systemtap-${kernel.version}-${version}" {
rm $out/bin/stap rm $out/bin/stap
makeWrapper $stapBuild/bin/stap $out/bin/stap \ makeWrapper $stapBuild/bin/stap $out/bin/stap \
--add-flags "-r $kernelBuildDir" \ --add-flags "-r $kernelBuildDir" \
--prefix PATH : ${lib.makeBinPath [ stdenv.cc.cc binutils elfutils gnumake ]} --prefix PATH : ${lib.makeBinPath [ stdenv.cc.cc stdenv.cc.bintools elfutils gnumake ]}
'' ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, SDL, ncurses, libtcod, binutils }: { stdenv, fetchurl, SDL, ncurses, libtcod }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "brogue-${version}"; name = "brogue-${version}";

View File

@ -1,4 +1,4 @@
{ stdenv, steamArch, fetchurl, writeText, python2, dpkg, binutils }: { stdenv, steamArch, fetchurl, writeText, python2, dpkg }:
let input = builtins.getAttr steamArch (import ./runtime-generated.nix { inherit fetchurl; }); let input = builtins.getAttr steamArch (import ./runtime-generated.nix { inherit fetchurl; });
@ -7,7 +7,7 @@ let input = builtins.getAttr steamArch (import ./runtime-generated.nix { inherit
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "steam-runtime-2016-08-13"; name = "steam-runtime-2016-08-13";
nativeBuildInputs = [ python2 dpkg binutils ]; nativeBuildInputs = [ python2 dpkg stdenv.cc.bintools ];
buildCommand = '' buildCommand = ''
mkdir -p $out mkdir -p $out

View File

@ -1,6 +1,6 @@
{ stdenv, pkgs, lib, fetchurl, fetchgit, fetchsvn, fetchpatch, { stdenv, pkgs, lib, fetchurl, fetchgit, fetchsvn, fetchpatch,
jansson, libxml2, libxslt, ncurses, openssl, sqlite, jansson, libxml2, libxslt, ncurses, openssl, sqlite,
utillinux, dmidecode, libuuid, binutils, newt, utillinux, dmidecode, libuuid, newt,
lua, speex, lua, speex,
srtp, wget, curl srtp, wget, curl
}: }:
@ -10,7 +10,7 @@ let
inherit version; inherit version;
name = "asterisk-${version}"; name = "asterisk-${version}";
buildInputs = [ jansson libxml2 libxslt ncurses openssl sqlite utillinux dmidecode libuuid binutils newt lua speex srtp wget curl ]; buildInputs = [ jansson libxml2 libxslt ncurses openssl sqlite utillinux dmidecode libuuid newt lua speex srtp wget curl ];
patches = [ patches = [
# We want the Makefile to install the default /var skeleton # We want the Makefile to install the default /var skeleton

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
makeFlags = [ makeFlags = [
"INSTALL=install" "INSTALL=install"
"STRIP=strip" "STRIP=${stdenv.cc.bintools.prefix}strip"
"prefix=$(out)" "prefix=$(out)"
]; ];

View File

@ -13,8 +13,8 @@ stdenv.mkDerivation {
sha256 = "1zvadgsskmpm82id9mbj24a2lyq38qv768ixv7nmfjl3d4wr2biv"; sha256 = "1zvadgsskmpm82id9mbj24a2lyq38qv768ixv7nmfjl3d4wr2biv";
}; };
nativeBuildInputs = [ bison binutils gettext pkgconfig ]; nativeBuildInputs = [ bison gettext pkgconfig ];
buildInputs = [ glib gnutls gtk2 libxml2 zlib ]; buildInputs = [ binutils glib gnutls gtk2 libxml2 zlib ];
hardeningDisable = [ "bindnow" "fortify" "pic" "relro" ]; hardeningDisable = [ "bindnow" "fortify" "pic" "relro" ];