checkstyle: add wrapper in bin

This commit is contained in:
Jörg Thalheim 2018-08-20 14:41:49 +01:00
parent 6573f3a60b
commit 1b313a12da

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
version = "8.12";
@ -9,11 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "000048flqhkwnjn37bh07wgn6q4m12s3h3p9piqgvxswrjc95x3y";
};
phases = [ "installPhase" ];
nativeBuildInputs = [ makeWrapper jre ];
unpackPhase = ":";
installPhase = ''
mkdir -p $out/checkstyle
cp $src $out/checkstyle/checkstyle-all.jar
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 stdenv.lib; {