biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / security / ipscan / default.nix
blobf61944fe63eadeea9db50c16ed53c68ac48eb6c7
1 { lib
2 , stdenv
3 , fetchurl
4 , jdk
5 , jre
6 , swt
7 , makeWrapper
8 , xorg
9 , dpkg
12 stdenv.mkDerivation rec {
13   pname = "ipscan";
14   version = "3.9.1";
16   src = fetchurl {
17     url = "https://github.com/angryip/ipscan/releases/download/${version}/ipscan_${version}_amd64.deb";
18     hash = "sha256-UPkUwZV3NIeVfL3yYvqOhm4X5xW+40GOlZGy8WGhYmk=";
19   };
21   sourceRoot = ".";
22   unpackCmd = "${dpkg}/bin/dpkg-deb -x $src .";
24   nativeBuildInputs = [ makeWrapper ];
26   buildInputs = [ jdk ];
28   installPhase = ''
29     mkdir -p $out/share
30     cp usr/lib/ipscan/ipscan-linux64-${version}.jar $out/share/${pname}-${version}.jar
32     makeWrapper ${jre}/bin/java $out/bin/ipscan \
33       --prefix LD_LIBRARY_PATH : "$out/lib/:${lib.makeLibraryPath [ swt xorg.libXtst ]}" \
34       --add-flags "-Xmx256m -cp $out/share/${pname}-${version}.jar:${swt}/jars/swt.jar net.azib.ipscan.Main"
36     mkdir -p $out/share/applications
37     cp usr/share/applications/ipscan.desktop $out/share/applications/ipscan.desktop
38     substituteInPlace $out/share/applications/ipscan.desktop --replace "/usr/bin" "$out/bin"
40     mkdir -p $out/share/pixmaps
41     cp usr/share/pixmaps/ipscan.png $out/share/pixmaps/ipscan.png
42   '';
44   meta = with lib; {
45     description = "Angry IP Scanner - fast and friendly network scanner";
46     mainProgram = "ipscan";
47     homepage = "https://angryip.org";
48     downloadPage = "https://github.com/angryip/ipscan/releases/tag/${version}";
49     changelog = "https://github.com/angryip/ipscan/blob/${version}/CHANGELOG";
50     sourceProvenance = with sourceTypes; [ binaryBytecode ];
51     license = licenses.gpl2Only;
52     platforms = [ "x86_64-linux" ];
53     maintainers = with maintainers; [ kylesferrazza totoroot ];
54   };