1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/interpreters/groovy/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
# at runtime, need jdk
stdenv.mkDerivation rec {
name = "groovy-${version}";
2017-08-01 19:56:09 +01:00
version = "2.4.12";
src = fetchurl {
url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip";
2017-08-01 19:56:09 +01:00
sha256 = "1dm7m221pqbgh3lp1q1nvv6qc0fpja3cgsd0mx3ghahcfsfa3fck";
};
buildInputs = [ unzip makeWrapper ];
installPhase = ''
mkdir -p $out
mkdir -p $out/share/doc/groovy
rm bin/*.bat
mv {bin,conf,embeddable,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";
2015-02-24 17:59:17 +00:00
homepage = http://groovy-lang.org/;
license = licenses.asl20;
maintainers = with maintainers; [ pSub ];
platforms = with platforms; unix;
};
}