From 6f52bf806328b140ad7898d63d53ec59f95179e1 Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Tue, 28 Nov 2017 13:36:38 +0000 Subject: [PATCH] drip: provided which at run time --- pkgs/development/tools/drip/default.nix | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/drip/default.nix b/pkgs/development/tools/drip/default.nix index 877cba061f09..17aa94ebf366 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 = '' + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ jdk ]; + + postPatch = '' + patchShebangs . + ''; + + installPhase = '' + runHook preInstall mkdir $out cp ./* $out -r - ''; - - buildPhase = '' + 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;