at 23.11-beta 39 lines 1.3 kB view raw
1{ lib, stdenvNoCC, fetchurl, makeBinaryWrapper, jre }: 2 3stdenvNoCC.mkDerivation rec { 4 version = "10.12.5"; 5 pname = "checkstyle"; 6 7 src = fetchurl { 8 url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${version}/checkstyle-${version}-all.jar"; 9 sha256 = "sha256-DAUPngTL9c2MePG5ISLul+iRvnwqChg04fo63aKAee0="; 10 }; 11 12 nativeBuildInputs = [ makeBinaryWrapper ]; 13 buildInputs = [ jre ]; 14 15 dontUnpack = true; 16 17 installPhase = '' 18 runHook preInstall 19 install -D $src $out/checkstyle/checkstyle-all.jar 20 makeWrapper ${jre}/bin/java $out/bin/checkstyle \ 21 --add-flags "-jar $out/checkstyle/checkstyle-all.jar" 22 runHook postInstall 23 ''; 24 25 meta = with lib; { 26 description = "Checks Java source against a coding standard"; 27 longDescription = '' 28 checkstyle is a development tool to help programmers write Java code that 29 adheres to a coding standard. By default it supports the Sun Code 30 Conventions, but is highly configurable. 31 ''; 32 homepage = "https://checkstyle.org/"; 33 changelog = "https://checkstyle.org/releasenotes.html#Release_${version}"; 34 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 35 license = licenses.lgpl21; 36 maintainers = with maintainers; [ pSub ]; 37 platforms = jre.meta.platforms; 38 }; 39}