nixpkgs/pkgs/tools/networking/zap/default.nix
Ryan Mulligan 15ac81145e zap: 2.5.0 -> 2.7.0
Semi-automatic update. These checks were performed:

- built on NixOS
- found 2.7.0 with grep in /nix/store/7yw2vm6f6mpj22hyhhirz3ffdmcl58xq-zap-2.7.0
- found 2.7.0 in filename of file in /nix/store/7yw2vm6f6mpj22hyhhirz3ffdmcl58xq-zap-2.7.0

cc "@mog"
2018-02-27 19:23:42 -08:00

38 lines
1,005 B
Nix

{ stdenv, fetchFromGitHub, jre, jdk, ant }:
stdenv.mkDerivation rec {
name = "zap-${version}";
version = "2.7.0";
src = fetchFromGitHub {
owner = "zaproxy";
repo = "zaproxy";
rev ="${version}";
sha256 = "1bz4pgq66v6kxmgj99llacm1d85vj8z78jlgc2z9hv0ha5i57y32";
};
buildInputs = [ jdk ant ];
buildPhase = ''
cd build
echo -n "${version}" > version.txt
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 "#!/bin/sh" > "$out/bin/zap"
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;
description = "Java application for web penetration testing";
maintainers = with maintainers; [ mog ];
platforms = platforms.linux;
license = licenses.asl20;
};
}