depot/third_party/nixpkgs/pkgs/development/tools/analysis/jacoco/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

45 lines
1 KiB
Nix

{ lib
, stdenv
, fetchzip
, makeWrapper
, jre
}:
stdenv.mkDerivation rec {
pname = "jacoco";
version = "0.8.12";
src = fetchzip {
url = "https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/${version}/jacoco-${version}.zip";
stripRoot = false;
sha256 = "sha256-7bN68fcUycehJDJeBAyCloz8rb3SXgjwmC9zpob8YdI=";
};
outputs = [ "out" "doc" ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $doc/share/doc $out/bin
cp -r doc $doc/share/doc/jacoco
install -Dm444 lib/* -t $out/share/java
makeWrapper ${jre}/bin/java $out/bin/jacoco \
--add-flags "-jar $out/share/java/jacococli.jar"
runHook postInstall
'';
meta = with lib; {
description = "Free code coverage library for Java";
mainProgram = "jacoco";
homepage = "https://www.jacoco.org/jacoco";
changelog = "https://www.jacoco.org/jacoco/trunk/doc/changes.html";
license = licenses.epl20;
platforms = platforms.all;
maintainers = with maintainers; [ figsoda ];
};
}