nixpkgs/pkgs/by-name/ch/checkstyle/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.3 KiB
Nix
Raw Normal View History

2023-06-28 05:20:00 +01:00
{ lib, stdenvNoCC, fetchurl, makeBinaryWrapper, jre }:
2023-06-28 05:20:00 +01:00
stdenvNoCC.mkDerivation rec {
2024-11-01 13:24:25 +00:00
version = "10.20.0";
pname = "checkstyle";
src = fetchurl {
url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${version}/checkstyle-${version}-all.jar";
2024-11-01 13:24:25 +00:00
sha256 = "sha256-WvC5UyLxW1WHlVRs0Ll2kGwXM/9Z98qdYtjKaG2w5is=";
};
2023-06-28 05:20:00 +01:00
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ jre ];
2018-08-20 14:41:49 +01:00
2019-06-19 16:45:34 +01:00
dontUnpack = true;
installPhase = ''
2018-08-20 14:41:49 +01:00
runHook preInstall
install -D $src $out/checkstyle/checkstyle-all.jar
makeWrapper ${jre}/bin/java $out/bin/checkstyle \
--add-flags "-jar $out/checkstyle/checkstyle-all.jar"
runHook postInstall
'';
meta = with lib; {
description = "Checks Java source against a coding standard";
mainProgram = "checkstyle";
longDescription = ''
checkstyle is a development tool to help programmers write Java code that
adheres to a coding standard. By default it supports the Sun Code
Conventions, but is highly configurable.
'';
2023-06-28 05:20:00 +01:00
homepage = "https://checkstyle.org/";
changelog = "https://checkstyle.org/releasenotes.html#Release_${version}";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.lgpl21;
maintainers = with maintainers; [ pSub ];
2019-06-01 11:25:44 +01:00
platforms = jre.meta.platforms;
};
}