nixpkgs-suyu/pkgs/development/libraries/libbfd/default.nix
Will Dietz a65aa78e14 libbfd: simplify per reviewer feedback
Changing postPatch to postAutoreconf is needed
when updateAutotoolsGnuConfigScriptsHook is used
or the directory change happens too early.
2018-02-13 11:20:08 -06:00

50 lines
1.4 KiB
Nix

{ stdenv
, fetchurl, fetchpatch, autoreconfHook264, bison, binutils-raw
, libiberty, zlib
}:
stdenv.mkDerivation rec {
name = "libbfd-${version}";
inherit (binutils-raw.bintools) version src;
outputs = [ "out" "dev" ];
patches = binutils-raw.bintools.patches ++ [
../../tools/misc/binutils/build-components-separately.patch
(fetchpatch {
url = "https://raw.githubusercontent.com/mxe/mxe/e1d4c144ee1994f70f86cf7fd8168fe69bd629c6/src/bfd-1-disable-subdir-doc.patch";
sha256 = "0pzb3i74d1r7lhjan376h59a7kirw15j7swwm8pz3zy9lkdqkj6q";
})
];
# We just want to build libbfd
postAutoreconf = ''
cd bfd
'';
nativeBuildInputs = [ autoreconfHook264 bison ];
buildInputs = [ libiberty zlib ];
configureFlags = [
"--enable-targets=all" "--enable-64-bit-bfd"
"--enable-install-libbfd"
"--enable-shared"
"--with-system-zlib"
];
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "A library for manipulating containers of machine code";
longDescription = ''
BFD is a library which provides a single interface to read and write
object files, executables, archive files, and core files in any format.
It is associated with GNU Binutils, and elsewhere often distributed with
it.
'';
homepage = http://www.gnu.org/software/binutils/;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ericson2314 ];
platforms = platforms.unix;
};
}