From 1b313a12dabe5e1584a9412d382cd4e84f526601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 20 Aug 2018 14:41:49 +0100 Subject: [PATCH] checkstyle: add wrapper in bin --- .../tools/analysis/checkstyle/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/analysis/checkstyle/default.nix b/pkgs/development/tools/analysis/checkstyle/default.nix index b5e7328091e..690db9a30e1 100644 --- a/pkgs/development/tools/analysis/checkstyle/default.nix +++ b/pkgs/development/tools/analysis/checkstyle/default.nix @@ -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; {