2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, jdk, jre, swt, makeWrapper, xorg, dpkg }:
|
2019-11-26 00:56:29 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ipscan";
|
2021-04-28 01:44:50 +02:00
|
|
|
version = "3.7.6";
|
2019-11-26 00:56:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-03-18 18:27:09 +01:00
|
|
|
url = "https://github.com/angryip/ipscan/releases/download/${version}/ipscan_${version}_all.deb";
|
2021-04-28 01:44:50 +02:00
|
|
|
sha256 = "sha256-IjbuCCwcAOlCM2XbM5qBGjaGn8xNNDjoyJmCzP5JF/Q=";
|
2019-11-26 00:56:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
unpackCmd = "${dpkg}/bin/dpkg-deb -x $src .";
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jdk ];
|
2019-11-26 00:56:29 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share
|
2020-03-18 18:27:09 +01:00
|
|
|
cp usr/lib/ipscan/ipscan-any-${version}.jar $out/share/${pname}-${version}.jar
|
2019-11-26 00:56:29 +01:00
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/ipscan \
|
2021-01-15 10:19:50 +01:00
|
|
|
--prefix LD_LIBRARY_PATH : "$out/lib/:${lib.makeLibraryPath [ swt xorg.libXtst ]}" \
|
2019-11-26 00:56:29 +01: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-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-11-26 00:56:29 +01:00
|
|
|
description = "Fast and friendly network scanner";
|
2020-03-18 08:20:53 +01:00
|
|
|
homepage = "https://angryip.org";
|
2019-11-26 00:56:29 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ kylesferrazza ];
|
|
|
|
};
|
|
|
|
}
|