571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
46 lines
1.0 KiB
Nix
46 lines
1.0 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 ];
|
|
};
|
|
}
|