diff options
author | 7c6f434c <7c6f434c@mail.ru> | 2024-04-23 09:48:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-23 09:48:36 +0000 |
commit | f48462535ca85be9f20cc99fe32580944c7d0efc (patch) | |
tree | 753c699ecc9b3b37fc3802a08c362b7eb6a3ba6f | |
parent | 58f072f4a8d9f1ee4701ed39a4cf6017d33fb1d9 (diff) | |
parent | 7b67f66039cc9567cf72f86ad95519adc7badfc6 (diff) |
Merge pull request #305130 from zebreus/init-autopsy
autopsy: init at 4.21.0
-rw-r--r-- | pkgs/by-name/au/autopsy/package.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/by-name/au/autopsy/package.nix b/pkgs/by-name/au/autopsy/package.nix new file mode 100644 index 0000000000000..359a7affa3a00 --- /dev/null +++ b/pkgs/by-name/au/autopsy/package.nix @@ -0,0 +1,49 @@ +{ stdenv, lib, makeWrapper, fetchzip, testdisk, imagemagick, jdk, findutils, sleuthkit, ... }: +let + jdkWithJfx = jdk.override (lib.optionalAttrs stdenv.isLinux { + enableJavaFX = true; + }); +in +stdenv.mkDerivation rec { + pname = "autopsy"; + version = "4.21.0"; + + src = fetchzip { + url = "https://github.com/sleuthkit/autopsy/releases/download/autopsy-${version}/autopsy-${version}.zip"; + sha256 = "32iOQA3+ykltCYW/MpqCVxyhh3mm6eYzY+t0smAsWRw="; + }; + + nativeBuildInputs = [ makeWrapper findutils ]; + buildInputs = [ testdisk imagemagick jdkWithJfx ]; + + installPhase = '' + runHook preInstall + + cp -r . $out + + # Run the provided setup script to make files executable and copy sleuthkit + TSK_JAVA_LIB_PATH="${sleuthkit}/share/java" bash $out/unix_setup.sh -j '${jdkWithJfx}' -n autopsy + + substituteInPlace $out/bin/autopsy \ + --replace-warn 'APPNAME=`basename "$PRG"`' 'APPNAME=autopsy' + wrapProgram $out/bin/autopsy \ + --run 'export SOLR_LOGS_DIR="$HOME/.autopsy/dev/var/log"' \ + --run 'export SOLR_PID_DIR="$HOME/.autopsy/dev"' \ + --prefix PATH : "${lib.makeBinPath [ testdisk imagemagick jdkWithJfx ]}" + + runHook postInstall + ''; + + meta = { + description = "Graphical interface to The Sleuth Kit and other open source digital forensics tools"; + homepage = "https://www.sleuthkit.org/autopsy"; + changelog = "https://github.com/sleuthkit/autopsy/releases/tag/autopsy-${version}"; + # Autopsy brings a lot of vendored dependencies + license = with lib.licenses; [ asl20 ipl10 lgpl3Only lgpl21Only zlib wtfpl bsd3 cc-by-30 mit gpl2Only ]; + maintainers = with lib.maintainers; [ zebreus ]; + mainProgram = "autopsy"; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + # Autopsy theoretically also supports darwin + platforms = lib.platforms.x86_64; + }; +} |