ipscan: init at 3.6.2 (#74209)
* ipscan: init at 3.6.2 * ipscan: build from deb, and add desktop file * ipscan: remove java.library.path * ipscan: move jar from share/java to share * ipscan: fix platforms
This commit is contained in:
parent
50b8b05368
commit
71b79c3e5c
40
pkgs/tools/security/ipscan/default.nix
Normal file
40
pkgs/tools/security/ipscan/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ stdenv, fetchurl, jdk, jre, swt, makeWrapper, xorg, dpkg }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ipscan";
|
||||
version = "3.6.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/angryip/ipscan/releases/download/${version}/ipscan_${version}_amd64.deb";
|
||||
sha256 = "0wnnnabpj0dsxdijvss5sl9kd4i6rmcq55zbas33xs3c5g305ssk";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
unpackCmd = "${dpkg}/bin/dpkg-deb -x $src .";
|
||||
|
||||
buildInputs = [ makeWrapper jdk ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share
|
||||
cp usr/lib/ipscan/ipscan-linux64-${version}.jar $out/share/${pname}-${version}.jar
|
||||
|
||||
makeWrapper ${jre}/bin/java $out/bin/ipscan \
|
||||
--prefix LD_LIBRARY_PATH : "$out/lib/:${stdenv.lib.makeLibraryPath [ swt xorg.libXtst ]}" \
|
||||
--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
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Fast and friendly network scanner";
|
||||
homepage = https://angryip.org;
|
||||
license = licenses.gpl2;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ kylesferrazza ];
|
||||
};
|
||||
}
|
|
@ -4148,6 +4148,8 @@ in
|
|||
|
||||
netmask = callPackage ../tools/networking/netmask {};
|
||||
|
||||
ipscan = callPackage ../tools/security/ipscan { };
|
||||
|
||||
ipv6calc = callPackage ../tools/networking/ipv6calc {};
|
||||
|
||||
ipxe = callPackage ../tools/misc/ipxe { };
|
||||
|
|
Loading…
Reference in a new issue