2021-01-23 14:15:07 +01:00
|
|
|
{ lib, stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
|
2010-03-30 01:36:32 +02:00
|
|
|
|
|
|
|
# at runtime, need jdk
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "groovy";
|
2020-12-05 22:28:43 +01:00
|
|
|
version = "3.0.7";
|
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";
|
2020-12-05 22:28:43 +01:00
|
|
|
sha256 = "1xdpjqx7qaq0syw448b32q36g12pgh1hn6knyqi3k5isp0f09qmr";
|
2010-03-30 01:36:32 +02:00
|
|
|
};
|
|
|
|
|
2021-02-20 22:01:53 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
2015-11-05 20:36:11 +01:00
|
|
|
|
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
|
2018-05-31 09:33:42 +02:00
|
|
|
mv {bin,conf,grooid,indy,lib} $out
|
2016-10-29 20:19:02 +02:00
|
|
|
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
|
|
|
'';
|
|
|
|
|
2021-01-23 14:15:07 +01:00
|
|
|
meta = with lib; {
|
2010-03-30 01:36:32 +02:00
|
|
|
description = "An agile dynamic language for the Java Platform";
|
2020-04-05 22:36:41 +02: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
|
|
|
};
|
|
|
|
}
|