nixpkgs/pkgs/development/interpreters/groovy/default.nix

40 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
# at runtime, need jdk
stdenv.mkDerivation rec {
pname = "groovy";
2020-11-02 05:57:01 +00:00
version = "3.0.6";
src = fetchurl {
url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip";
2020-11-02 05:57:01 +00:00
sha256 = "1wimpcg4nyxykbkh407d7h0b828vmrf7sv412mgmif57p3aw433f";
};
buildInputs = [ unzip makeWrapper ];
installPhase = ''
mkdir -p $out
mkdir -p $out/share/doc/groovy
rm bin/*.bat
2018-05-31 07:33:42 +00:00
mv {bin,conf,grooid,indy,lib} $out
mv {licenses,LICENSE,NOTICE} $out/share/doc/groovy
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
'';
meta = with stdenv.lib; {
description = "An agile dynamic language for the Java Platform";
2020-04-05 20:36:41 +00:00
homepage = "http://groovy-lang.org/";
license = licenses.asl20;
maintainers = with maintainers; [ pSub ];
platforms = with platforms; unix;
};
}