3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/interpreters/groovy/default.nix
Vladimír Čunát 2e6bf42a22
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
2019-08-24 08:55:37 +02:00

40 lines
1 KiB
Nix

{ stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
# at runtime, need jdk
stdenv.mkDerivation rec {
pname = "groovy";
version = "2.5.8";
src = fetchurl {
url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip";
sha256 = "0hl7m9fpmrn9ppxbb3pm68048xpzig7q6hqyg121gvcziywi9ys9";
};
buildInputs = [ unzip makeWrapper ];
installPhase = ''
mkdir -p $out
mkdir -p $out/share/doc/groovy
rm bin/*.bat
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";
homepage = http://groovy-lang.org/;
license = licenses.asl20;
maintainers = with maintainers; [ pSub ];
platforms = with platforms; unix;
};
}