summary refs log tree commit diff
path: root/pkgs/development/libraries/libbfd/default.nix
blob: 7709f550675171ce6bc8f831bce9cf6bf3cc4d3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ stdenv
, fetchurl, autoreconfHook264, bison, binutils
, libiberty, zlib
}:

stdenv.mkDerivation rec {
  name = "libbfd-${version}";
  inherit (binutils) version src;

  outputs = [ "out" "dev" ];

  patches = binutils.patches ++ [
    ../../tools/misc/binutils/build-components-separately.patch
  ];

  # We just want to build libbfd
  postPatch = ''
    cd bfd
  '';

  nativeBuildInputs = [ autoreconfHook264 bison ];
  buildInputs = [ libiberty zlib ];

  configurePlatforms = [ "build" "host" ];
  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;
  };
}