nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at fix-function-merge 40 lines 1.3 kB view raw
1{ lib, stdenvNoCC, fetchurl, makeBinaryWrapper, jre }: 2 3stdenvNoCC.mkDerivation rec { 4 version = "10.17.0"; 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-UcNNc4UgwTidcZmKmrDm2r4NfPJiFJ8+AacpRJYGLkI="; 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 mainProgram = "checkstyle"; 28 longDescription = '' 29 checkstyle is a development tool to help programmers write Java code that 30 adheres to a coding standard. By default it supports the Sun Code 31 Conventions, but is highly configurable. 32 ''; 33 homepage = "https://checkstyle.org/"; 34 changelog = "https://checkstyle.org/releasenotes.html#Release_${version}"; 35 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 36 license = licenses.lgpl21; 37 maintainers = with maintainers; [ pSub ]; 38 platforms = jre.meta.platforms; 39 }; 40}