8 , stripJavaArchivesHook
15 stdenv.mkDerivation (finalAttrs: {
17 version = "4.12.1"; # Note: when updating don't forget to also update the rdeps outputHash
19 src = fetchFromGitHub {
22 rev = "sleuthkit-${finalAttrs.version}";
23 hash = "sha256-q51UY2lIcLijycNaq9oQIwUXpp/1mfc3oPN4syOPF44=";
26 # Fetch libraries using a fixed output derivation
27 rdeps = stdenv.mkDerivation {
28 name = "sleuthkit-${finalAttrs.version}-deps";
29 inherit (finalAttrs) src;
31 nativeBuildInputs = [ ant jdk ];
33 # unpack, build, install
37 export IVY_HOME=$NIX_BUILD_TOP/.ant
42 ant get-ivy-dependencies
47 mkdir -m 755 -p $out/bindings/java
48 cp -r bindings/java/lib $out/bindings/java
49 mkdir -m 755 -p $out/case-uco/java
50 cp -r case-uco/java/lib $out/case-uco/java
51 cp -r $IVY_HOME/lib $out
55 outputHashMode = "recursive";
56 outputHashAlgo = "sha256";
57 outputHash = "sha256-mc/KQrwn3xpPI0ngOLcpoQDaJJm/rM8XgaX//5PiRZk=";
61 export IVY_HOME="$NIX_BUILD_TOP/.ant"
62 export ANT_ARGS="-Doffline=true -Ddefault-jar-location=$IVY_HOME/lib"
64 # pre-positioning these jar files allows -Doffline=true to work
65 mkdir -p source/{bindings,case-uco}/java $IVY_HOME
66 cp -r ${finalAttrs.rdeps}/bindings/java/lib source/bindings/java
67 chmod -R 755 source/bindings/java
68 cp -r ${finalAttrs.rdeps}/case-uco/java/lib source/case-uco/java
69 chmod -R 755 source/case-uco/java
70 cp -r ${finalAttrs.rdeps}/lib $IVY_HOME
71 chmod -R 755 $IVY_HOME
75 substituteInPlace tsk/img/ewf.cpp --replace libewf_handle_read_random libewf_handle_read_buffer_at_offset
78 enableParallelBuilding = true;
95 # Hack to fix the RPATH
101 description = "Forensic/data recovery tool";
102 homepage = "https://www.sleuthkit.org/";
103 changelog = "https://github.com/sleuthkit/sleuthkit/blob/${finalAttrs.src.rev}/NEWS.txt";
104 maintainers = with maintainers; [ raskin gfrascadorio ];
105 platforms = platforms.linux;
106 sourceProvenance = with sourceTypes; [
108 binaryBytecode # dependencies
110 license = licenses.ipl10;