summary refs log tree commit diff
path: root/pkgs/development/tools/drip
diff options
context:
space:
mode:
authorJoerg Thalheim <joerg@thalheim.io>2017-11-28 13:36:38 +0000
committerJoerg Thalheim <joerg@thalheim.io>2017-11-28 13:36:38 +0000
commit6f52bf806328b140ad7898d63d53ec59f95179e1 (patch)
tree6b4a20089ba2a0f63f4a9f9513e105d3db2a3f5b /pkgs/development/tools/drip
parent1a2e2cac3622827f02ce892ded84e6adb4e8c7b0 (diff)
downloadnixpkgs-6f52bf806328b140ad7898d63d53ec59f95179e1.tar
nixpkgs-6f52bf806328b140ad7898d63d53ec59f95179e1.tar.gz
nixpkgs-6f52bf806328b140ad7898d63d53ec59f95179e1.tar.bz2
nixpkgs-6f52bf806328b140ad7898d63d53ec59f95179e1.tar.lz
nixpkgs-6f52bf806328b140ad7898d63d53ec59f95179e1.tar.xz
nixpkgs-6f52bf806328b140ad7898d63d53ec59f95179e1.tar.zst
nixpkgs-6f52bf806328b140ad7898d63d53ec59f95179e1.zip
drip: provided which at run time
Diffstat (limited to 'pkgs/development/tools/drip')
-rw-r--r--pkgs/development/tools/drip/default.nix25
1 files changed, 15 insertions, 10 deletions
diff --git a/pkgs/development/tools/drip/default.nix b/pkgs/development/tools/drip/default.nix
index 877cba061f0..17aa94ebf36 100644
--- a/pkgs/development/tools/drip/default.nix
+++ b/pkgs/development/tools/drip/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, gcc, jdk, which }:
+{ stdenv, fetchFromGitHub, jdk, which, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
@@ -12,21 +12,26 @@ stdenv.mkDerivation rec {
     sha256 = "1zl62wdwfak6z725asq5lcqb506la1aavj7ag78lvp155wyh8aq1";
   };
 
-  buildInputs = [ gcc jdk which ];
- 
-  patchPhase = ''
-    mkdir $out
-    cp ./* $out -r
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [ jdk ];
+
+  postPatch = ''
+    patchShebangs .
   '';
 
-  buildPhase = ''
+  installPhase = ''
+    runHook preInstall
+    mkdir $out
+    cp ./* $out -r
+    wrapProgram $out/bin/drip \
+      --prefix PATH : "${which}/bin"
     $out/bin/drip version
+    runHook postInstall
   '';
 
-  phases = [ "unpackPhase" "patchPhase" "buildPhase" ];
-
   meta = with stdenv.lib; {
-    description = "a launcher for the Java Virtual Machine intended to be a drop-in replacement for the java command, only faster";
+    description = "A launcher for the Java Virtual Machine intended to be a drop-in replacement for the java command, only faster";
     license = licenses.epl10;
     homepage = https://github.com/ninjudd/drip;
     platforms = platforms.linux;