2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, autoreconfHook, makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
, perlPackages, libxml2, libiconv }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hivex";
|
2021-08-08 23:34:03 +00:00
|
|
|
version = "1.3.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-10-07 09:15:18 +00:00
|
|
|
url = "https://libguestfs.org/download/hivex/${pname}-${version}.tar.gz";
|
2021-08-08 23:34:03 +00:00
|
|
|
sha256 = "sha256-ms4+9KL/LKUKmb4Gi2D7H9vJ6rivU+NF6XznW6S2O1Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./hivex-syms.patch ];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
libxml2
|
2020-04-24 23:36:52 +00:00
|
|
|
]
|
|
|
|
++ (with perlPackages; [ perl IOStringy ])
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/hivexregedit \
|
|
|
|
--set PERL5LIB "$out/${perlPackages.perl.libPrefix}" \
|
|
|
|
--prefix "PATH" : "$out/bin"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/hivexml \
|
|
|
|
--prefix "PATH" : "$out/bin"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Windows registry hive extraction library";
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
homepage = "https://github.com/libguestfs/hivex";
|
|
|
|
maintainers = with maintainers; [offline];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|