2023-12-26 23:20:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchzip
|
|
|
|
, jre
|
|
|
|
, giflib
|
|
|
|
, gawk
|
|
|
|
, makeBinaryWrapper
|
|
|
|
, icoutils
|
|
|
|
, copyDesktopItems
|
|
|
|
, makeDesktopItem
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "maltego";
|
2024-05-01 04:26:37 +00:00
|
|
|
version = "4.7.0";
|
2023-12-26 23:20:59 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://downloads.maltego.com/maltego-v4/linux/Maltego.v${finalAttrs.version}.linux.zip";
|
2024-05-01 04:26:37 +00:00
|
|
|
hash = "sha256-dPpkIoWK/mzC9wD+3QTNv3tYG27QVgCxtAymkwjIwUY=";
|
2023-12-26 23:20:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-01-04 00:58:58 +00:00
|
|
|
substituteInPlace bin/maltego \
|
|
|
|
--replace-fail /usr/bin/awk ${lib.getExe gawk}
|
2023-12-26 23:20:59 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-04 00:58:58 +00:00
|
|
|
desktopItems = [
|
2023-12-26 23:20:59 +00:00
|
|
|
(makeDesktopItem {
|
2024-01-04 00:58:58 +00:00
|
|
|
name = "maltego";
|
2023-12-26 23:20:59 +00:00
|
|
|
desktopName = "Maltego";
|
2024-01-04 00:58:58 +00:00
|
|
|
exec = "maltego";
|
|
|
|
icon = "maltego";
|
2023-12-26 23:20:59 +00:00
|
|
|
comment = "An open source intelligence and forensics application";
|
|
|
|
categories = [ "Network" "Security" ];
|
|
|
|
startupNotify = false;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
icoutils
|
|
|
|
makeBinaryWrapper
|
|
|
|
copyDesktopItems
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ jre giflib ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/{bin,share}
|
|
|
|
chmod +x bin/maltego
|
|
|
|
|
|
|
|
icotool -x bin/maltego.ico
|
|
|
|
|
|
|
|
for size in 16 32 48 256
|
|
|
|
do
|
|
|
|
mkdir -p $out/share/icons/hicolor/$size\x$size/apps
|
|
|
|
cp maltego_*_$size\x$size\x32.png $out/share/icons/hicolor/$size\x$size/apps/maltego.png
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -r *.png
|
|
|
|
|
|
|
|
cp -aR . "$out/share/maltego/"
|
|
|
|
|
2024-01-04 00:58:58 +00:00
|
|
|
makeWrapper $out/share/maltego/bin/maltego $out/bin/maltego \
|
2023-12-26 23:20:59 +00:00
|
|
|
--set JAVA_HOME ${jre} \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ jre ]}
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.maltego.com";
|
|
|
|
description = "An open source intelligence and forensics application, enabling to easily gather information about DNS, domains, IP addresses, websites, persons, and so on";
|
|
|
|
mainProgram = "maltego";
|
|
|
|
maintainers = with maintainers; [ emilytrau d3vil0p3r ];
|
2024-01-04 00:58:58 +00:00
|
|
|
platforms = platforms.unix;
|
2023-12-26 23:20:59 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
|
|
license = licenses.unfree;
|
|
|
|
};
|
|
|
|
})
|