2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchzip
|
|
|
|
, makeWrapper
|
|
|
|
, jre
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jacoco";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.8.12";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/${version}/jacoco-${version}.zip";
|
|
|
|
stripRoot = false;
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-7bN68fcUycehJDJeBAyCloz8rb3SXgjwmC9zpob8YdI=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 = "A free code coverage library for Java";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "jacoco";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://www.jacoco.org/jacoco";
|
|
|
|
changelog = "https://www.jacoco.org/jacoco/trunk/doc/changes.html";
|
2022-11-21 17:40:18 +00:00
|
|
|
license = licenses.epl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|