Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / analysis / jacoco / default.nix
blob3bcd7b59160f479c0d3c7f2ae995cc682f89ff09
1 { lib
2 , stdenv
3 , fetchzip
4 , makeWrapper
5 , jre
6 }:
8 stdenv.mkDerivation rec {
9   pname = "jacoco";
10   version = "0.8.11";
12   src = fetchzip {
13     url = "https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/${version}/jacoco-${version}.zip";
14     stripRoot = false;
15     sha256 = "sha256-Sd4Kh5ts0IdHhd9vF1XZzZ2KFRb+rsnzpam6Ysxu910=";
16   };
18   outputs = [ "out" "doc" ];
20   nativeBuildInputs = [ makeWrapper ];
22   installPhase = ''
23     runHook preInstall
25     mkdir -p $doc/share/doc $out/bin
27     cp -r doc $doc/share/doc/jacoco
28     install -Dm444 lib/* -t $out/share/java
30     makeWrapper ${jre}/bin/java $out/bin/jacoco \
31       --add-flags "-jar $out/share/java/jacococli.jar"
33     runHook postInstall
34   '';
36   meta = with lib; {
37     description = "A free code coverage library for Java";
38     homepage = "https://www.jacoco.org/jacoco";
39     changelog = "https://www.jacoco.org/jacoco/trunk/doc/changes.html";
40     license = licenses.epl20;
41     platforms = platforms.all;
42     maintainers = with maintainers; [ figsoda ];
43   };