2015-11-05 20:36:11 +01:00
|
|
|
{ stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
|
2010-03-30 01:36:32 +02:00
|
|
|
|
|
|
|
# at runtime, need jdk
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-08-07 23:40:30 +02:00
|
|
|
name = "groovy-${version}";
|
2017-08-01 20:56:09 +02:00
|
|
|
version = "2.4.12";
|
2010-03-30 01:36:32 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-11-05 20:36:11 +01:00
|
|
|
url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip";
|
2017-08-01 20:56:09 +02:00
|
|
|
sha256 = "1dm7m221pqbgh3lp1q1nvv6qc0fpja3cgsd0mx3ghahcfsfa3fck";
|
2010-03-30 01:36:32 +02:00
|
|
|
};
|
|
|
|
|
2015-11-05 20:36:11 +01:00
|
|
|
buildInputs = [ unzip makeWrapper ];
|
|
|
|
|
2010-03-30 01:36:32 +02:00
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out
|
2016-10-29 20:19:02 +02:00
|
|
|
mkdir -p $out/share/doc/groovy
|
2010-03-30 01:36:32 +02:00
|
|
|
rm bin/*.bat
|
2016-10-29 20:19:02 +02:00
|
|
|
mv {bin,conf,embeddable,grooid,indy,lib} $out
|
|
|
|
mv {licenses,LICENSE,NOTICE} $out/share/doc/groovy
|
2015-11-05 20:36:11 +01: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 01:36:32 +02:00
|
|
|
'';
|
|
|
|
|
2014-08-07 23:40:30 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-03-30 01:36:32 +02:00
|
|
|
description = "An agile dynamic language for the Java Platform";
|
2015-02-24 18:59:17 +01:00
|
|
|
homepage = http://groovy-lang.org/;
|
2014-08-07 23:40:30 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = with platforms; unix;
|
2010-03-30 01:36:32 +02:00
|
|
|
};
|
|
|
|
}
|