2016-01-17 23:04:40 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, autoreconfHook, makeWrapper
|
2019-03-31 18:44:23 +01:00
|
|
|
, perlPackages, libxml2, libiconv }:
|
2014-11-06 10:29:02 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "hivex";
|
2020-08-03 12:25:10 +01:00
|
|
|
version = "1.3.19";
|
2014-11-06 10:29:02 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://libguestfs.org/download/hivex/${pname}-${version}.tar.gz";
|
2020-08-03 12:25:10 +01:00
|
|
|
sha256 = "0qppahpf7jq950nf8ial47h90nyqgnsffsj3zgdjjwkn958wq0ji";
|
2014-11-06 10:29:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./hivex-syms.patch ];
|
|
|
|
|
2017-09-14 20:24:37 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2014-11-06 10:29:02 +00:00
|
|
|
buildInputs = [
|
2018-12-15 03:50:31 +00:00
|
|
|
autoreconfHook makeWrapper libxml2
|
2019-03-31 18:44:23 +01:00
|
|
|
]
|
|
|
|
++ (with perlPackages; [ perl IOStringy ])
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
|
2014-11-06 10:29:02 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2019-03-31 18:44:23 +01:00
|
|
|
wrapProgram $out/bin/hivexregedit \
|
|
|
|
--set PERL5LIB "$out/${perlPackages.perl.libPrefix}" \
|
|
|
|
--prefix "PATH" : "$out/bin"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/hivexml \
|
|
|
|
--prefix "PATH" : "$out/bin"
|
2014-11-06 10:29:02 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Windows registry hive extraction library";
|
|
|
|
license = licenses.lgpl2;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/libguestfs/hivex";
|
2014-11-06 10:29:02 +00:00
|
|
|
maintainers = with maintainers; [offline];
|
2019-03-31 18:44:23 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2014-11-06 10:29:02 +00:00
|
|
|
};
|
|
|
|
}
|