2015-11-05 19:36:11 +00:00
|
|
|
{ stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
|
2010-03-30 00:36:32 +01:00
|
|
|
|
|
|
|
# at runtime, need jdk
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-08-07 22:40:30 +01:00
|
|
|
name = "groovy-${version}";
|
2015-11-05 19:36:11 +00:00
|
|
|
version = "2.4.5";
|
2010-03-30 00:36:32 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-11-05 19:36:11 +00:00
|
|
|
url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip";
|
|
|
|
sha256 = "1ajcrma18z0zr7h69bg4v2brxnxa4ljc9a55pk4q92vi3ypyks47";
|
2010-03-30 00:36:32 +01:00
|
|
|
};
|
|
|
|
|
2015-11-05 19:36:11 +00:00
|
|
|
buildInputs = [ unzip makeWrapper ];
|
|
|
|
|
2010-03-30 00:36:32 +01:00
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out
|
2010-03-30 00:36:32 +01:00
|
|
|
rm bin/*.bat
|
|
|
|
mv * $out
|
2015-11-05 19:36:11 +00:00
|
|
|
|
|
|
|
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
|
2010-03-30 00:36:32 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
phases = "unpackPhase installPhase";
|
|
|
|
|
2014-08-07 22:40:30 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-03-30 00:36:32 +01:00
|
|
|
description = "An agile dynamic language for the Java Platform";
|
2015-02-24 17:59:17 +00:00
|
|
|
homepage = http://groovy-lang.org/;
|
2014-08-07 22:40:30 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
2010-03-30 00:36:32 +01:00
|
|
|
};
|
|
|
|
}
|