2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenvNoCC, fetchurl, makeBinaryWrapper, jre }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "10.12.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "checkstyle";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${version}/checkstyle-${version}-all.jar";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-DAUPngTL9c2MePG5ISLul+iRvnwqChg04fo63aKAee0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ jre ];
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Checks Java source against a coding standard";
|
|
|
|
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-07-15 17:15:38 +00:00
|
|
|
homepage = "https://checkstyle.org/";
|
|
|
|
changelog = "https://checkstyle.org/releasenotes.html#Release_${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
platforms = jre.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|