1 { lib, stdenv, fetchurl, jdk, jre, swt, makeWrapper, xorg, dpkg }:
3 stdenv.mkDerivation rec {
8 url = "https://github.com/angryip/ipscan/releases/download/${version}/ipscan_${version}_all.deb";
9 sha256 = "sha256-064V1KnMXBnjgM6mBrwkezdl+Tko3Xri0D4fCk9iPbk=";
13 unpackCmd = "${dpkg}/bin/dpkg-deb -x $src .";
15 nativeBuildInputs = [ makeWrapper ];
16 buildInputs = [ jdk ];
20 cp usr/lib/ipscan/ipscan-any-${version}.jar $out/share/${pname}-${version}.jar
22 makeWrapper ${jre}/bin/java $out/bin/ipscan \
23 --prefix LD_LIBRARY_PATH : "$out/lib/:${lib.makeLibraryPath [ swt xorg.libXtst ]}" \
24 --add-flags "-Xmx256m -cp $out/share/${pname}-${version}.jar:${swt}/jars/swt.jar net.azib.ipscan.Main"
26 mkdir -p $out/share/applications
27 cp usr/share/applications/ipscan.desktop $out/share/applications/ipscan.desktop
28 substituteInPlace $out/share/applications/ipscan.desktop --replace "/usr/bin" "$out/bin"
30 mkdir -p $out/share/pixmaps
31 cp usr/share/pixmaps/ipscan.png $out/share/pixmaps/ipscan.png
35 description = "Fast and friendly network scanner";
36 homepage = "https://angryip.org";
37 sourceProvenance = with sourceTypes; [ binaryBytecode ];
38 license = licenses.gpl2;
39 platforms = [ "x86_64-linux" ];
40 maintainers = with maintainers; [ kylesferrazza ];