From 291aa2109e5cdceeba795eafbb9df5cacb4c9ed5 Mon Sep 17 00:00:00 2001 From: D3vil0p3r Date: Tue, 2 Jan 2024 23:45:24 +0100 Subject: [PATCH] regripper: init at unstable-2023-07-23 Update package.nix --- pkgs/by-name/re/regripper/package.nix | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pkgs/by-name/re/regripper/package.nix diff --git a/pkgs/by-name/re/regripper/package.nix b/pkgs/by-name/re/regripper/package.nix new file mode 100644 index 000000000000..ba1d2f741def --- /dev/null +++ b/pkgs/by-name/re/regripper/package.nix @@ -0,0 +1,55 @@ +{ lib +, stdenv +, fetchFromGitHub +, perl +, runtimeShell +}: + +stdenv.mkDerivation rec { + pname = "regripper"; + version = "unstable-2023-07-23"; + + src = fetchFromGitHub { + owner = "keydet89"; + repo = "RegRipper3.0"; + rev = "cee174fb6f137b14c426e97d17945ddee0d31051"; + sha256 = "sha256-vejIRlcVjxQJpxJabJJcljODYr+lLJjYINVtAPObvkQ="; + }; + + buildInputs = [ perl ]; + + postPatch = '' + substituteInPlace rip.pl rr.pl \ + --replace \"plugins/\" \"$out/share/regripper/plugins/\" + substituteInPlace rip.pl rr.pl \ + --replace \"plugins\" \"$out/share/regripper/plugins\" + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{bin,share} + + rm -r *.md *.exe *.bat *.dll + + cp -aR . "$out/share/regripper/" + + cat > "$out/bin/${pname}" << EOF + #!${runtimeShell} + exec ${perl}/bin/perl $out/share/regripper/rip.pl "\$@" + EOF + + chmod u+x "$out/bin/${pname}" + + runHook postInstall + ''; + + meta = with lib; { + description = "Open source forensic software used as a Windows Registry data extraction command line"; + mainProgram = "regripper"; + homepage = "https://github.com/keydet89/RegRipper3.0"; + maintainers = with maintainers; [ d3vil0p3r ]; + platforms = with platforms; linux ++ darwin; + license = licenses.mit; + }; +}