16 stdenv.mkDerivation (finalAttrs: {
18 version = "4.12.1"; # Note: when updating don't forget to also update the rdeps outputHash
20 src = fetchFromGitHub {
23 rev = "sleuthkit-${finalAttrs.version}";
24 hash = "sha256-q51UY2lIcLijycNaq9oQIwUXpp/1mfc3oPN4syOPF44=";
27 # Fetch libraries using a fixed output derivation
28 rdeps = stdenv.mkDerivation {
29 name = "sleuthkit-${finalAttrs.version}-deps";
30 inherit (finalAttrs) src;
37 # unpack, build, install
41 export IVY_HOME=$NIX_BUILD_TOP/.ant
46 ant get-ivy-dependencies
51 mkdir -m 755 -p $out/bindings/java
52 cp -r bindings/java/lib $out/bindings/java
53 mkdir -m 755 -p $out/case-uco/java
54 cp -r case-uco/java/lib $out/case-uco/java
55 cp -r $IVY_HOME/lib $out
59 outputHashMode = "recursive";
60 outputHashAlgo = "sha256";
61 outputHash = "sha256-mc/KQrwn3xpPI0ngOLcpoQDaJJm/rM8XgaX//5PiRZk=";
65 export IVY_HOME="$NIX_BUILD_TOP/.ant"
66 export ANT_ARGS="-Doffline=true -Ddefault-jar-location=$IVY_HOME/lib"
68 # pre-positioning these jar files allows -Doffline=true to work
69 mkdir -p source/{bindings,case-uco}/java $IVY_HOME
70 cp -r ${finalAttrs.rdeps}/bindings/java/lib source/bindings/java
71 chmod -R 755 source/bindings/java
72 cp -r ${finalAttrs.rdeps}/case-uco/java/lib source/case-uco/java
73 chmod -R 755 source/case-uco/java
74 cp -r ${finalAttrs.rdeps}/lib $IVY_HOME
75 chmod -R 755 $IVY_HOME
79 substituteInPlace tsk/img/ewf.cpp --replace libewf_handle_read_random libewf_handle_read_buffer_at_offset
82 enableParallelBuilding = true;
99 # Hack to fix the RPATH
105 description = "Forensic/data recovery tool";
106 homepage = "https://www.sleuthkit.org/";
107 changelog = "https://github.com/sleuthkit/sleuthkit/blob/${finalAttrs.src.rev}/NEWS.txt";
108 maintainers = with maintainers; [
112 platforms = platforms.linux;
113 sourceProvenance = with sourceTypes; [
115 binaryBytecode # dependencies
117 license = licenses.ipl10;