2 , fetchpatch, gnu-config, autoreconfHook, bison, binutils-unwrapped_2_38
3 , libiberty, libintl, zlib
8 inherit (binutils-unwrapped_2_38) version src;
10 outputs = [ "out" "dev" ];
12 patches = binutils-unwrapped_2_38.patches ++ [
13 ./build-components-separately.patch
15 url = "https://raw.githubusercontent.com/mxe/mxe/e1d4c144ee1994f70f86cf7fd8168fe69bd629c6/src/bfd-1-disable-subdir-doc.patch";
16 sha256 = "0pzb3i74d1r7lhjan376h59a7kirw15j7swwm8pz3zy9lkdqkj6q";
20 # We just want to build libbfd
26 echo "Updating config.guess and config.sub from ${gnu-config}"
27 cp -f ${gnu-config}/config.{guess,sub} ../
30 # We update these ourselves
31 dontUpdateAutotoolsGnuConfigScripts = true;
34 nativeBuildInputs = [ autoreconfHook bison ];
35 buildInputs = [ libiberty zlib ] ++ lib.optionals stdenv.isDarwin [ libintl ];
37 configurePlatforms = [ "build" "host" ];
39 "--enable-targets=all" "--enable-64-bit-bfd"
40 "--enable-install-libbfd"
42 ] ++ lib.optional (!stdenv.hostPlatform.isStatic) "--enable-shared";
44 enableParallelBuilding = true;
47 description = "A library for manipulating containers of machine code";
49 BFD is a library which provides a single interface to read and write
50 object files, executables, archive files, and core files in any format.
51 It is associated with GNU Binutils, and elsewhere often distributed with
54 homepage = "https://www.gnu.org/software/binutils/";
55 license = licenses.gpl3Plus;
56 maintainers = with maintainers; [ ericson2314 ];
57 platforms = platforms.unix;