drip: provided which at run time

This commit is contained in:
Joerg Thalheim 2017-11-28 13:36:38 +00:00
parent 1a2e2cac36
commit 6f52bf8063

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, gcc, jdk, which }: { stdenv, fetchFromGitHub, jdk, which, makeWrapper }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
@ -12,21 +12,26 @@ stdenv.mkDerivation rec {
sha256 = "1zl62wdwfak6z725asq5lcqb506la1aavj7ag78lvp155wyh8aq1"; sha256 = "1zl62wdwfak6z725asq5lcqb506la1aavj7ag78lvp155wyh8aq1";
}; };
buildInputs = [ gcc jdk which ]; nativeBuildInputs = [ makeWrapper ];
patchPhase = '' buildInputs = [ jdk ];
postPatch = ''
patchShebangs .
'';
installPhase = ''
runHook preInstall
mkdir $out mkdir $out
cp ./* $out -r cp ./* $out -r
''; wrapProgram $out/bin/drip \
--prefix PATH : "${which}/bin"
buildPhase = ''
$out/bin/drip version $out/bin/drip version
runHook postInstall
''; '';
phases = [ "unpackPhase" "patchPhase" "buildPhase" ];
meta = with stdenv.lib; { 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; license = licenses.epl10;
homepage = https://github.com/ninjudd/drip; homepage = https://github.com/ninjudd/drip;
platforms = platforms.linux; platforms = platforms.linux;