From d05e3c02078b780aeb5e945a76e21371848db5fe Mon Sep 17 00:00:00 2001 From: VykosMolt Date: Sat, 5 Sep 2026 14:00:52 +0200 Subject: [PATCH] hivex: fix hivexget runtime dependencies Assisted-by: Codex (GPT-6 Astra) --- pkgs/by-name/hi/hivex/package.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/by-name/hi/hivex/package.nix b/pkgs/by-name/hi/hivex/package.nix index 9fde1623738c..5cef21df44c6 100644 --- a/pkgs/by-name/hi/hivex/package.nix +++ b/pkgs/by-name/hi/hivex/package.nix @@ -5,6 +5,7 @@ pkg-config, autoreconfHook, makeWrapper, + bash, perlPackages, ocamlPackages, libxml2, @@ -39,6 +40,7 @@ stdenv.mkDerivation rec { findlib ]); buildInputs = [ + bash libxml2 ] ++ (with perlPackages; [ @@ -50,6 +52,9 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' + wrapProgram $out/bin/hivexget \ + --prefix "PATH" : "$out/bin" + wrapProgram $out/bin/hivexregedit \ --set PERL5LIB "$out/${perlPackages.perl.libPrefix}" \ --prefix "PATH" : "$out/bin" @@ -58,6 +63,16 @@ stdenv.mkDerivation rec { --prefix "PATH" : "$out/bin" ''; + doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + + installCheckPhase = '' + runHook preInstallCheck + + test "$(PATH=/nonexistent "$out/bin/hivexget" images/special '\abcd_äöüß' 'abcd_äöüß')" = 0 + + runHook postInstallCheck + ''; + meta = { description = "Windows registry hive extraction library"; license = lib.licenses.lgpl2Only;