nixpkgs/pkgs/tools/networking/zap/default.nix

39 lines
1.0 KiB
Nix
Raw Normal View History

2020-09-19 16:47:06 +01:00
{ stdenv, fetchFromGitHub, jdk8, ant, runtimeShell }:
2016-01-09 04:00:29 +00:00
2020-09-19 16:47:06 +01:00
let jdk = jdk8; in
2016-01-09 04:00:29 +00:00
stdenv.mkDerivation rec {
pname = "zap";
version = "2.7.0";
2016-01-09 04:00:29 +00:00
src = fetchFromGitHub {
owner = "zaproxy";
repo = "zaproxy";
2019-09-09 00:38:31 +01:00
rev =version;
sha256 = "1bz4pgq66v6kxmgj99llacm1d85vj8z78jlgc2z9hv0ha5i57y32";
2016-01-09 04:00:29 +00:00
};
buildInputs = [ jdk ant ];
buildPhase = ''
cd build
2016-06-08 19:21:04 +01:00
echo -n "${version}" > version.txt
2016-01-09 04:00:29 +00:00
ant -f build.xml setup init compile dist copy-source-to-build package-linux
'';
installPhase = ''
mkdir -p "$out/share"
tar xvf "ZAP_${version}_Linux.tar.gz" -C "$out/share/"
mkdir -p "$out/bin"
echo "#!${runtimeShell}" > "$out/bin/zap"
2016-01-09 04:00:29 +00:00
echo \"$out/share/ZAP_${version}/zap.sh\" >> "$out/bin/zap"
chmod +x "$out/bin/zap"
'';
meta = with stdenv.lib; {
homepage = "https://www.owasp.org/index.php/ZAP";
2016-01-09 04:00:29 +00:00
description = "Java application for web penetration testing";
maintainers = with maintainers; [ mog ];
2016-01-09 04:00:29 +00:00
platforms = platforms.linux;
license = licenses.asl20;
};
}