Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / ma / maltego / package.nix
blob3af5602ca8c976f4f81f47be19ee644df51ed3f3
1 { lib
2 , stdenv
3 , fetchzip
4 , jre
5 , giflib
6 , gawk
7 , makeBinaryWrapper
8 , icoutils
9 , copyDesktopItems
10 , makeDesktopItem
13 stdenv.mkDerivation (finalAttrs: {
14   pname = "maltego";
15   version = "4.7.0";
17   src = fetchzip {
18     url = "https://downloads.maltego.com/maltego-v4/linux/Maltego.v${finalAttrs.version}.linux.zip";
19     hash = "sha256-dPpkIoWK/mzC9wD+3QTNv3tYG27QVgCxtAymkwjIwUY=";
20   };
22   postPatch = ''
23     substituteInPlace bin/maltego \
24       --replace-fail /usr/bin/awk ${lib.getExe gawk}
25   '';
27   desktopItems = [
28     (makeDesktopItem {
29       name = "maltego";
30       desktopName = "Maltego";
31       exec = "maltego";
32       icon = "maltego";
33       comment = "An open source intelligence and forensics application";
34       categories = [ "Network" "Security" ];
35       startupNotify = false;
36     })
37   ];
39   nativeBuildInputs = [
40     icoutils
41     makeBinaryWrapper
42     copyDesktopItems
43   ];
45   buildInputs = [ jre giflib ];
47   installPhase = ''
48     runHook preInstall
50     mkdir -p $out/{bin,share}
51     chmod +x bin/maltego
53     icotool -x bin/maltego.ico
55     for size in 16 32 48 256
56     do
57       mkdir -p $out/share/icons/hicolor/$size\x$size/apps
58       cp maltego_*_$size\x$size\x32.png $out/share/icons/hicolor/$size\x$size/apps/maltego.png
59     done
61     rm -r *.png
63     cp -aR . "$out/share/maltego/"
65     makeWrapper $out/share/maltego/bin/maltego $out/bin/maltego \
66       --set JAVA_HOME ${jre} \
67       --prefix PATH : ${lib.makeBinPath [ jre ]}
69     runHook postInstall
70   '';
72   meta = with lib; {
73     homepage = "https://www.maltego.com";
74     description = "Open source intelligence and forensics application, enabling to easily gather information about DNS, domains, IP addresses, websites, persons, and so on";
75     mainProgram = "maltego";
76     maintainers = with maintainers; [ emilytrau d3vil0p3r ];
77     platforms = platforms.unix;
78     sourceProvenance = with sourceTypes; [ binaryBytecode ];
79     license = licenses.unfree;
80   };