summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-08-20 14:41:49 +0100
committerJörg Thalheim <joerg@thalheim.io>2018-08-20 14:42:05 +0100
commit1b313a12dabe5e1584a9412d382cd4e84f526601 (patch)
tree7e78edcb04d45b4305b4d2e8f2eeb112f1d28a0f /pkgs/development/tools
parent6573f3a60bc2c2a9675773ca0e76b41bf8cd4011 (diff)
downloadnixlib-1b313a12dabe5e1584a9412d382cd4e84f526601.tar
nixlib-1b313a12dabe5e1584a9412d382cd4e84f526601.tar.gz
nixlib-1b313a12dabe5e1584a9412d382cd4e84f526601.tar.bz2
nixlib-1b313a12dabe5e1584a9412d382cd4e84f526601.tar.lz
nixlib-1b313a12dabe5e1584a9412d382cd4e84f526601.tar.xz
nixlib-1b313a12dabe5e1584a9412d382cd4e84f526601.tar.zst
nixlib-1b313a12dabe5e1584a9412d382cd4e84f526601.zip
checkstyle: add wrapper in bin
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/analysis/checkstyle/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/tools/analysis/checkstyle/default.nix b/pkgs/development/tools/analysis/checkstyle/default.nix
index b5e7328091ee..690db9a30e1a 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; {