diff options
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/libbfd/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/libraries/libopcodes/default.nix | 43 |
2 files changed, 90 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libbfd/default.nix b/pkgs/development/libraries/libbfd/default.nix new file mode 100644 index 00000000000..7709f550675 --- /dev/null +++ b/pkgs/development/libraries/libbfd/default.nix @@ -0,0 +1,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; + }; +} diff --git a/pkgs/development/libraries/libopcodes/default.nix b/pkgs/development/libraries/libopcodes/default.nix new file mode 100644 index 00000000000..c064ca25c49 --- /dev/null +++ b/pkgs/development/libraries/libopcodes/default.nix @@ -0,0 +1,43 @@ +{ stdenv, buildPackages +, fetchurl, autoreconfHook264, bison, binutils +, libiberty, libbfd +}: + +stdenv.mkDerivation rec { + name = "libopcodes-${version}"; + inherit (binutils) version src; + + outputs = [ "out" "dev" ]; + + patches = binutils.patches ++ [ + ../../tools/misc/binutils/build-components-separately.patch + ]; + + # We just want to build libopcodes + postPatch = '' + cd opcodes + find . ../include/opcode -type f -exec sed {} -i -e 's/"bfd.h"/<bfd.h>/' \; + ''; + + nativeBuildInputs = [ autoreconfHook264 bison buildPackages.stdenv.cc ]; + buildInputs = [ libiberty ]; + # dis-asm.h includes bfd.h + propagatedBuildInputs = [ libbfd ]; + + configurePlatforms = [ "build" "host" ]; + configureFlags = [ + "--enable-targets=all" "--enable-64-bit-bfd" + "--enable-install-libbfd" + "--enable-shared" + ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "A library from binutils for manipulating machine code"; + homepage = http://www.gnu.org/software/binutils/; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ericson2314 ]; + platforms = platforms.unix; + }; +} |