2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, jdk, jre, swt, makeWrapper, xorg, dpkg }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ipscan";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "3.7.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/angryip/ipscan/releases/download/${version}/ipscan_${version}_all.deb";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "sha256-IjbuCCwcAOlCM2XbM5qBGjaGn8xNNDjoyJmCzP5JF/Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
unpackCmd = "${dpkg}/bin/dpkg-deb -x $src .";
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jdk ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp usr/lib/ipscan/ipscan-any-${version}.jar $out/share/${pname}-${version}.jar
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/ipscan \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "$out/lib/:${lib.makeLibraryPath [ swt xorg.libXtst ]}" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--add-flags "-Xmx256m -cp $out/share/${pname}-${version}.jar:${swt}/jars/swt.jar net.azib.ipscan.Main"
|
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp usr/share/applications/ipscan.desktop $out/share/applications/ipscan.desktop
|
|
|
|
substituteInPlace $out/share/applications/ipscan.desktop --replace "/usr/bin" "$out/bin"
|
|
|
|
|
|
|
|
mkdir -p $out/share/pixmaps
|
|
|
|
cp usr/share/pixmaps/ipscan.png $out/share/pixmaps/ipscan.png
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fast and friendly network scanner";
|
|
|
|
homepage = "https://angryip.org";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ kylesferrazza ];
|
|
|
|
};
|
|
|
|
}
|