Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 59 lines 1.8 kB view raw
1{ lib, stdenv 2, fetchpatch, gnu-config, autoreconfHook, bison, binutils-unwrapped_2_38 3, libiberty, libintl, zlib 4}: 5 6stdenv.mkDerivation { 7 pname = "libbfd"; 8 inherit (binutils-unwrapped_2_38) version src; 9 10 outputs = [ "out" "dev" ]; 11 12 patches = binutils-unwrapped_2_38.patches ++ [ 13 ./build-components-separately.patch 14 (fetchpatch { 15 url = "https://raw.githubusercontent.com/mxe/mxe/e1d4c144ee1994f70f86cf7fd8168fe69bd629c6/src/bfd-1-disable-subdir-doc.patch"; 16 sha256 = "0pzb3i74d1r7lhjan376h59a7kirw15j7swwm8pz3zy9lkdqkj6q"; 17 }) 18 ]; 19 20 # We just want to build libbfd 21 postPatch = '' 22 cd bfd 23 ''; 24 25 postAutoreconf = '' 26 echo "Updating config.guess and config.sub from ${gnu-config}" 27 cp -f ${gnu-config}/config.{guess,sub} ../ 28 ''; 29 30 # We update these ourselves 31 dontUpdateAutotoolsGnuConfigScripts = true; 32 33 strictDeps = true; 34 nativeBuildInputs = [ autoreconfHook bison ]; 35 buildInputs = [ libiberty zlib ] ++ lib.optionals stdenv.isDarwin [ libintl ]; 36 37 configurePlatforms = [ "build" "host" ]; 38 configureFlags = [ 39 "--enable-targets=all" "--enable-64-bit-bfd" 40 "--enable-install-libbfd" 41 "--with-system-zlib" 42 ] ++ lib.optional (!stdenv.hostPlatform.isStatic) "--enable-shared"; 43 44 enableParallelBuilding = true; 45 46 meta = with lib; { 47 description = "A library for manipulating containers of machine code"; 48 longDescription = '' 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 52 it. 53 ''; 54 homepage = "https://www.gnu.org/software/binutils/"; 55 license = licenses.gpl3Plus; 56 maintainers = with maintainers; [ ericson2314 ]; 57 platforms = platforms.unix; 58 }; 59}