1 { stdenv, lib, makeWrapper, fetchzip, testdisk, imagemagick, jdk, findutils, sleuthkit, ... }:
3 jdkWithJfx = jdk.override (lib.optionalAttrs stdenv.hostPlatform.isLinux {
7 stdenv.mkDerivation rec {
12 url = "https://github.com/sleuthkit/autopsy/releases/download/autopsy-${version}/autopsy-${version}.zip";
13 hash = "sha256-32iOQA3+ykltCYW/MpqCVxyhh3mm6eYzY+t0smAsWRw=";
16 nativeBuildInputs = [ makeWrapper findutils ];
17 buildInputs = [ testdisk imagemagick jdkWithJfx ];
24 # Run the provided setup script to make files executable and copy sleuthkit
25 TSK_JAVA_LIB_PATH="${sleuthkit}/share/java" bash $out/unix_setup.sh -j '${jdkWithJfx}' -n autopsy
27 substituteInPlace $out/bin/autopsy \
28 --replace-warn 'APPNAME=`basename "$PRG"`' 'APPNAME=autopsy'
29 wrapProgram $out/bin/autopsy \
30 --run 'export SOLR_LOGS_DIR="$HOME/.autopsy/dev/var/log"' \
31 --run 'export SOLR_PID_DIR="$HOME/.autopsy/dev"' \
32 --prefix PATH : "${lib.makeBinPath [ testdisk imagemagick jdkWithJfx ]}"
38 description = "Graphical interface to The Sleuth Kit and other open source digital forensics tools";
39 homepage = "https://www.sleuthkit.org/autopsy";
40 changelog = "https://github.com/sleuthkit/autopsy/releases/tag/autopsy-${version}";
41 # Autopsy brings a lot of vendored dependencies
42 license = with lib.licenses; [ asl20 ipl10 lgpl3Only lgpl21Only zlib wtfpl bsd3 cc-by-30 mit gpl2Only ];
43 maintainers = with lib.maintainers; [ zebreus ];
44 mainProgram = "autopsy";
45 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
46 # Autopsy theoretically also supports darwin
47 platforms = lib.platforms.x86_64;