summary refs log tree commit diff
path: root/pkgs/development/libraries/hivex
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2014-11-06 11:29:02 +0100
committerJaka Hudoklin <jakahudoklin@gmail.com>2014-11-09 15:24:08 +0100
commit7dc7ccbe5bae19e10ff80ab13a511349ffcd8906 (patch)
tree8d50182e64c7289fa3eacdb09af74590ce4e6a42 /pkgs/development/libraries/hivex
parentcc3ba830554598c955a650aa3fc82ba57b8e9080 (diff)
downloadnixpkgs-7dc7ccbe5bae19e10ff80ab13a511349ffcd8906.tar
nixpkgs-7dc7ccbe5bae19e10ff80ab13a511349ffcd8906.tar.gz
nixpkgs-7dc7ccbe5bae19e10ff80ab13a511349ffcd8906.tar.bz2
nixpkgs-7dc7ccbe5bae19e10ff80ab13a511349ffcd8906.tar.lz
nixpkgs-7dc7ccbe5bae19e10ff80ab13a511349ffcd8906.tar.xz
nixpkgs-7dc7ccbe5bae19e10ff80ab13a511349ffcd8906.tar.zst
nixpkgs-7dc7ccbe5bae19e10ff80ab13a511349ffcd8906.zip
Add hivex, windows registry hive extraction library
Diffstat (limited to 'pkgs/development/libraries/hivex')
-rw-r--r--pkgs/development/libraries/hivex/default.nix37
-rw-r--r--pkgs/development/libraries/hivex/hivex-syms.patch13
2 files changed, 50 insertions, 0 deletions
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)