depot/third_party/nixpkgs/pkgs/development/tools/analysis/jacoco/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

43 lines
957 B
Nix

{ lib
, stdenv
, fetchzip
, makeWrapper
, jre
}:
stdenv.mkDerivation rec {
pname = "jacoco";
version = "0.8.8";
src = fetchzip {
url = "https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/${version}/jacoco-${version}.zip";
stripRoot = false;
sha256 = "sha256-NfXkMAFG1yMj1o06Hlhg9+B4RzL0I36fAGjZx3IC+NQ=";
};
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";
homepage = "https://jacoco.org/jacoco";
license = licenses.epl20;
platforms = platforms.all;
maintainers = with maintainers; [ figsoda ];
};
}