2019-02-26 12:45:54 +01:00
|
|
|
{ stdenv, fetchFromGitHub, jdk, ant, runtimeShell }:
|
2016-01-09 05:00:29 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "zap";
|
2018-02-28 04:23:42 +01:00
|
|
|
version = "2.7.0";
|
2016-01-09 05:00:29 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zaproxy";
|
|
|
|
repo = "zaproxy";
|
2019-09-09 01:38:31 +02:00
|
|
|
rev =version;
|
2018-02-28 04:23:42 +01:00
|
|
|
sha256 = "1bz4pgq66v6kxmgj99llacm1d85vj8z78jlgc2z9hv0ha5i57y32";
|
2016-01-09 05:00:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ jdk ant ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd build
|
2016-06-08 20:21:04 +02:00
|
|
|
echo -n "${version}" > version.txt
|
2016-01-09 05:00:29 +01: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"
|
2019-02-26 12:45:54 +01:00
|
|
|
echo "#!${runtimeShell}" > "$out/bin/zap"
|
2016-01-09 05:00:29 +01:00
|
|
|
echo \"$out/share/ZAP_${version}/zap.sh\" >> "$out/bin/zap"
|
|
|
|
chmod +x "$out/bin/zap"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.owasp.org/index.php/ZAP";
|
2016-01-09 05:00:29 +01:00
|
|
|
description = "Java application for web penetration testing";
|
2019-02-26 12:45:54 +01:00
|
|
|
maintainers = with maintainers; [ mog ];
|
2016-01-09 05:00:29 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|