treewide: Try to avoid depending on binutils directly

One should depend on

 - `stdenv.cc.bintools`: for executables at build time
 - `libbfd` or `libiberty`: for those libraries
 - `targetPackages.cc.bintools`: for exectuables at *run* time
 - `binutils`: only for specifically GNU Binutils's executables, regardless of
   the host platform, at run time.
wip/yesman
John Ericson 7 years ago
parent f72bffb4c4
commit d7bddc27b2
  1. 4
      pkgs/development/interpreters/lush/default.nix
  2. 5
      pkgs/development/libraries/lightning/default.nix
  3. 10
      pkgs/development/tools/analysis/kcov/default.nix
  4. 13
      pkgs/development/tools/profiling/oprofile/default.nix
  5. 8
      pkgs/development/tools/profiling/sysprof/default.nix
  6. 8
      pkgs/tools/filesystems/grive/default.nix
  7. 4
      pkgs/tools/filesystems/grive2/default.nix
  8. 4
      pkgs/tools/misc/diffoscope/default.nix
  9. 7
      pkgs/tools/package-management/rpm/default.nix
  10. 10
      pkgs/tools/security/sbsigntool/default.nix
  11. 2
      pkgs/top-level/python-packages.nix

@ -1,5 +1,5 @@
{stdenv, fetchurl, libX11, xproto, indent, readline, gsl, freeglut, mesa, SDL
, blas, binutils, intltool, gettext, zlib, libSM}:
, blas, libbfd, intltool, gettext, zlib, libSM}:
stdenv.mkDerivation rec {
baseName = "lush";
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [
libX11 libSM xproto indent readline gsl freeglut mesa SDL blas binutils
libX11 libSM xproto indent readline gsl freeglut mesa SDL blas libbfd
intltool gettext zlib
];

@ -1,4 +1,4 @@
{ stdenv, fetchurl, binutils }:
{ stdenv, fetchurl, libopcodes }:
with stdenv.lib;
stdenv.mkDerivation rec {
@ -11,8 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz";
};
# Needs libopcodes.so from binutils for 'make check'
buildInputs = [ binutils ];
buildInputs = stdenv.lib.optional doCheck libopcodes;
doCheck = true;

@ -1,4 +1,7 @@
{stdenv, fetchurl, cmake, pkgconfig, zlib, curl, elfutils, python, libiberty, binutils}:
{ stdenv
, fetchurl, cmake, pkgconfig
, zlib, curl, elfutils, python, libiberty, libopcodes
}:
stdenv.mkDerivation rec {
name = "kcov-${version}";
@ -10,8 +13,9 @@ stdenv.mkDerivation rec {
};
preConfigure = "patchShebangs src/bin-to-c-source.py";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake zlib curl elfutils python libiberty binutils ];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ zlib curl elfutils python libiberty libopcodes ];
meta = with stdenv.lib; {
description = "Code coverage tester for compiled programs, Python scripts and shell scripts";

@ -1,5 +1,8 @@
{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxHeaders, coreutils
, libiberty_static, withGUI ? false , qt4 ? null}:
{ stdenv, buildPackages
, fetchurl, pkgconfig
, libbfd, popt, zlib, linuxHeaders, libiberty_static
, withGUI ? false, qt4 ? null
}:
# libX11 is needed because the Qt build stuff automatically adds `-lX11'.
assert withGUI -> qt4 != null;
@ -14,12 +17,12 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace opjitconv/opjitconv.c \
--replace "/bin/rm" "${coreutils}/bin/rm" \
--replace "/bin/cp" "${coreutils}/bin/cp"
--replace "/bin/rm" "${buildPackages.coreutils}/bin/rm" \
--replace "/bin/cp" "${buildPackages.coreutils}/bin/cp"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ binutils zlib popt linuxHeaders libiberty_static ]
buildInputs = [ libbfd zlib popt linuxHeaders libiberty_static ]
++ stdenv.lib.optionals withGUI [ qt4 ];
configureFlags = [

@ -1,5 +1,7 @@
{ fetchurl, stdenv, binutils
, pkgconfig, gtk2, glib, pango, libglade }:
{ stdenv
, fetchurl, pkgconfig
, gtk2, glib, pango, libglade
}:
stdenv.mkDerivation rec {
name = "sysprof-1.2.0";
@ -10,7 +12,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ binutils gtk2 glib pango libglade ];
buildInputs = [ gtk2 glib pango libglade ];
meta = {
homepage = http://sysprof.com/;

@ -1,4 +1,4 @@
{ stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, binutils }:
{ stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, libiberty }:
stdenv.mkDerivation rec {
version = "0.3.0";
@ -10,10 +10,10 @@ stdenv.mkDerivation rec {
sha256 = "11cqfcjl128nfg1rjvpvr9x1x2ch3kyliw4vi14n51zqp82f9ysb";
};
buildInputs = [cmake libgcrypt json_c curl expat stdenv binutils boost];
buildInputs = [cmake libgcrypt json_c curl expat stdenv libiberty boost];
# work around new binutils headers, see
# http://stackoverflow.com/questions/11748035/binutils-bfd-h-wants-config-h-now
# work around new libiberty headers, see
# http://stackoverflow.com/questions/11748035/libiberty-bfd-h-wants-config-h-now
prePatch = ''
sed -i '1i#define PACKAGE "grive"\n#define PACKAGE_VERSION "${version}"' \
libgrive/src/bfd/SymbolInfo.cc

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig, fetchurl, yajl, cmake, libgcrypt, curl, expat, boost, binutils }:
{ stdenv, fetchFromGitHub, pkgconfig, fetchurl, yajl, cmake, libgcrypt, curl, expat, boost, libiberty }:
stdenv.mkDerivation rec {
version = "0.5.0";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ libgcrypt yajl curl expat stdenv boost binutils ];
buildInputs = [ libgcrypt yajl curl expat stdenv boost libiberty ];
meta = with stdenv.lib; {
description = "A console Google Drive client";

@ -1,5 +1,5 @@
{ lib, stdenv, fetchgit, python3Packages, docutils
, acl, apktool, binutils, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, diffutils, dtc
, acl, apktool, libbfd, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, diffutils, dtc
, e2fsprogs, file, findutils, fontforge-fonttools, fpc, gettext, ghc, ghostscriptX, giflib, gnupg1, gnutar
, gzip, imagemagick, jdk, libarchive, libcaca, llvm, mono, openssh, pdftk, pgpdump, poppler_utils, sng, sqlite
, squashfsTools, tcpdump, unoconv, unzip, xxd, xz
@ -28,7 +28,7 @@ python3Packages.buildPythonApplication rec {
# Still missing these tools: docx2txt enjarify js-beautify oggDump Rscript
# Also these libraries: python3-guestfs
pythonPath = with python3Packages; [ debian libarchive-c python_magic tlsh rpm ] ++ [
acl binutils bzip2 cdrkit colordiff coreutils cpio diffutils dtc e2fsprogs file findutils
acl libbfd bzip2 cdrkit colordiff coreutils cpio diffutils dtc e2fsprogs file findutils
fontforge-fonttools gettext gnutar gzip libarchive libcaca pgpdump sng sqlite
squashfsTools unzip xxd xz
] ++ lib.optionals enableBloat [

@ -1,4 +1,7 @@
{ stdenv, fetchurl, cpio, zlib, bzip2, file, elfutils, libarchive, nspr, nss, popt, db, xz, python, lua, pkgconfig, binutils, autoreconfHook }:
{ stdenv
, pkgconfig, autoreconfHook
, fetchurl, cpio, zlib, bzip2, file, elfutils, libbfd, libarchive, nspr, nss, popt, db, xz, python, lua
}:
stdenv.mkDerivation rec {
name = "rpm-${version}";
@ -15,7 +18,7 @@ stdenv.mkDerivation rec {
buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ];
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive binutils ];
propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive libbfd ];
NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss";

@ -1,5 +1,7 @@
{ stdenv, fetchgit, autoconf, automake, utillinux, openssl, libuuid, gnu-efi
, binutils, pkgconfig, help2man }:
{ stdenv
, fetchgit, autoconf, automake, pkgconfig, help2man
, utillinux, openssl, libuuid, gnu-efi, libbfd
}:
stdenv.mkDerivation rec {
name = "sbsigntool-${version}";
@ -15,8 +17,8 @@ stdenv.mkDerivation rec {
prePatch = "patchShebangs .";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ autoconf automake utillinux openssl libuuid gnu-efi binutils help2man ];
nativeBuildInputs = [ autoconf automake pkgconfig help2man ];
buildInputs = [ utillinux openssl libuuid gnu-efi libbfd ];
configurePhase = ''
substituteInPlace configure.ac --replace "@@NIX_GNUEFI@@" "${gnu-efi}"

@ -15226,7 +15226,7 @@ in {
preConfigure = ''
substituteInPlace setup.py \
--replace '"/usr/include"' '"${pkgs.gdb}/include"' \
--replace '"/usr/lib"' '"${pkgs.binutils.lib}/lib"'
--replace '"/usr/lib"' '"${pkgs.libbfd}/lib"'
'';
meta = {

Loading…
Cancel
Save