From 7dc7ccbe5bae19e10ff80ab13a511349ffcd8906 Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Thu, 6 Nov 2014 11:29:02 +0100 Subject: [PATCH] Add hivex, windows registry hive extraction library --- pkgs/development/libraries/hivex/default.nix | 37 +++++++++++++++++++ .../libraries/hivex/hivex-syms.patch | 13 +++++++ pkgs/top-level/all-packages.nix | 4 ++ 3 files changed, 54 insertions(+) create mode 100644 pkgs/development/libraries/hivex/default.nix create mode 100644 pkgs/development/libraries/hivex/hivex-syms.patch diff --git a/pkgs/development/libraries/hivex/default.nix b/pkgs/development/libraries/hivex/default.nix new file mode 100644 index 00000000000..4f0b3826022 --- /dev/null +++ b/pkgs/development/libraries/hivex/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, pkgconfig, automake, autoconf, libtool, makeWrapper +, perl, libxml2, IOStringy }: + +stdenv.mkDerivation rec { + name = "hivex-${version}"; + version = "1.3.11"; + + src = fetchurl { + url = "http://libguestfs.org/download/hivex/${name}.tar.gz"; + sha256 = "0y3nqykwy58divxkv7gmsb067dasyfz3apbp437hl57rgrndyfn6"; + }; + + patches = [ ./hivex-syms.patch ]; + + buildInputs = [ + pkgconfig automake autoconf libtool makeWrapper + perl libxml2 IOStringy + ]; + + preConfigure = '' + AUTOPOINT=true autoreconf --verbose --install + ''; + + postInstall = '' + for bin in $out/bin/*; do + wrapProgram "$bin" --prefix "PATH" : "$out/bin" + done + ''; + + meta = with stdenv.lib; { + description = "Windows registry hive extraction library"; + license = licenses.lgpl2; + homepage = https://github.com/libguestfs/hivex; + maintainers = with maintainers; [offline]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/development/libraries/hivex/hivex-syms.patch b/pkgs/development/libraries/hivex/hivex-syms.patch new file mode 100644 index 00000000000..2280ade59a6 --- /dev/null +++ b/pkgs/development/libraries/hivex/hivex-syms.patch @@ -0,0 +1,13 @@ +diff -rupN hivex-1.3.11/lib/Makefile.am hivex-1.3.11-new/lib/Makefile.am +--- hivex-1.3.11/lib/Makefile.am 2013-09-10 13:04:12.000000000 +0200 ++++ hivex-1.3.11-new/lib/Makefile.am 2014-11-06 01:31:05.956106861 +0100 +@@ -40,8 +40,7 @@ libhivex_la_SOURCES = \ + + libhivex_la_LIBADD = ../gnulib/lib/libgnu.la $(LTLIBOBJS) + libhivex_la_LDFLAGS = \ +- -version-info 0:0:0 \ +- $(VERSION_SCRIPT_FLAGS)$(srcdir)/hivex.syms \ ++ -version-info 0:0:0 + $(LTLIBICONV) \ + $(LTLIBINTL) \ + $(LTLIBTHREAD) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ff6debc22ff..20b7ed4dfdc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5476,6 +5476,10 @@ let libusb = libusb1; }; + hivex = callPackage ../development/libraries/hivex { + inherit (perlPackages) IOStringy; + }; + hspell = callPackage ../development/libraries/hspell { }; hspellDicts = callPackage ../development/libraries/hspell/dicts.nix { };