python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / security / ipscan / default.nix
blob24e8470182bf717e492ba889cf721956dd24503d
1 { lib, stdenv, fetchurl, jdk, jre, swt, makeWrapper, xorg, dpkg }:
3 stdenv.mkDerivation rec {
4   pname = "ipscan";
5   version = "3.8.2";
7   src = fetchurl {
8     url = "https://github.com/angryip/ipscan/releases/download/${version}/ipscan_${version}_all.deb";
9     sha256 = "sha256-064V1KnMXBnjgM6mBrwkezdl+Tko3Xri0D4fCk9iPbk=";
10   };
12   sourceRoot = ".";
13   unpackCmd = "${dpkg}/bin/dpkg-deb -x $src .";
15   nativeBuildInputs = [ makeWrapper ];
16   buildInputs = [ jdk ];
18   installPhase = ''
19     mkdir -p $out/share
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
32   '';
34   meta = with lib; {
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 ];
41   };