groovy: 2.4.3 -> 2.4.5 and wrap correctly

This commit is contained in:
Pascal Wittmann 2015-11-05 20:36:11 +01:00
parent cb30c3a95e
commit 17fbc42cde

View File

@ -1,26 +1,34 @@
{ stdenv, fetchurl, unzip }:
{ stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
# at runtime, need jdk
stdenv.mkDerivation rec {
name = "groovy-${version}";
version = "2.4.3";
version = "2.4.5";
src = fetchurl {
url = "http://dl.bintray.com/groovy/maven/groovy-binary-${version}.zip";
sha256 = "1qfvw49fbw9svk4gsniw0g0ghal0dqm2hf1i77qmcf80lln1vhdh";
url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip";
sha256 = "1ajcrma18z0zr7h69bg4v2brxnxa4ljc9a55pk4q92vi3ypyks47";
};
buildInputs = [ unzip makeWrapper ];
installPhase = ''
mkdir -p $out
rm bin/*.bat
mv * $out
sed -i 's#which#${which}/bin/which#g' $out/bin/startGroovy
for p in grape java2groovy groovy{,doc,c,sh,Console}; do
wrapProgram $out/bin/$p \
--set JAVA_HOME "${jdk}" \
--prefix PATH ":" "${jdk}/bin"
done
'';
phases = "unpackPhase installPhase";
buildInputs = [ unzip ];
meta = with stdenv.lib; {
description = "An agile dynamic language for the Java Platform";
homepage = http://groovy-lang.org/;