2015-11-05 19:36:11 +00:00
|
|
|
{ stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
|
2010-03-29 23:36:32 +00:00
|
|
|
|
|
|
|
# at runtime, need jdk
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "groovy";
|
2019-08-19 11:29:43 +00:00
|
|
|
version = "2.5.8";
|
2010-03-29 23:36:32 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-11-05 19:36:11 +00:00
|
|
|
url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip";
|
2019-08-19 11:29:43 +00:00
|
|
|
sha256 = "0hl7m9fpmrn9ppxbb3pm68048xpzig7q6hqyg121gvcziywi9ys9";
|
2010-03-29 23:36:32 +00:00
|
|
|
};
|
|
|
|
|
2015-11-05 19:36:11 +00:00
|
|
|
buildInputs = [ unzip makeWrapper ];
|
|
|
|
|
2010-03-29 23:36:32 +00:00
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out
|
2016-10-29 18:19:02 +00:00
|
|
|
mkdir -p $out/share/doc/groovy
|
2010-03-29 23:36:32 +00:00
|
|
|
rm bin/*.bat
|
2018-05-31 07:33:42 +00:00
|
|
|
mv {bin,conf,grooid,indy,lib} $out
|
2016-10-29 18:19:02 +00:00
|
|
|
mv {licenses,LICENSE,NOTICE} $out/share/doc/groovy
|
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-29 23:36:32 +00:00
|
|
|
'';
|
|
|
|
|
2014-08-07 21:40:30 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-03-29 23:36:32 +00: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 21:40:30 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = with platforms; unix;
|
2010-03-29 23:36:32 +00:00
|
|
|
};
|
|
|
|
}
|