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.
This commit is contained in:
@@ -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/;
|
||||
|
||||
Reference in New Issue
Block a user