2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, autoreconfHook, makeWrapper
|
2019-03-31 19:44:23 +02:00
|
|
|
, perlPackages, libxml2, libiconv }:
|
2014-11-06 11:29:02 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "hivex";
|
2021-08-05 01:18:01 +02:00
|
|
|
version = "1.3.21";
|
2014-11-06 11:29:02 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-10-02 09:58:50 +02:00
|
|
|
url = "https://libguestfs.org/download/hivex/${pname}-${version}.tar.gz";
|
2021-08-05 01:18:01 +02:00
|
|
|
sha256 = "sha256-ms4+9KL/LKUKmb4Gi2D7H9vJ6rivU+NF6XznW6S2O1Y=";
|
2014-11-06 11:29:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./hivex-syms.patch ];
|
|
|
|
|
2022-04-05 09:34:48 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
2014-11-06 11:29:02 +01:00
|
|
|
buildInputs = [
|
2022-04-05 09:34:48 +02:00
|
|
|
libxml2
|
2019-03-31 19:44:23 +02:00
|
|
|
]
|
|
|
|
++ (with perlPackages; [ perl IOStringy ])
|
2021-01-21 18:00:13 +01:00
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv ];
|
2014-11-06 11:29:02 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2019-03-31 19:44:23 +02: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 11:29:02 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2014-11-06 11:29:02 +01:00
|
|
|
description = "Windows registry hive extraction library";
|
|
|
|
license = licenses.lgpl2;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/libguestfs/hivex";
|
2014-11-06 11:29:02 +01:00
|
|
|
maintainers = with maintainers; [offline];
|
2019-03-31 19:44:23 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2014-11-06 11:29:02 +01:00
|
|
|
};
|
|
|
|
}
|