2012-01-18 20:32:20 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre }:
|
2010-07-28 11:55:54 +00:00
|
|
|
|
2014-04-22 17:00:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "jruby-${version}";
|
|
|
|
|
2015-07-09 02:33:01 +00:00
|
|
|
version = "1.7.21";
|
2009-06-26 16:52:58 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-04-22 17:00:09 +00:00
|
|
|
url = "http://jruby.org.s3.amazonaws.com/downloads/${version}/jruby-bin-${version}.tar.gz";
|
2015-07-09 02:33:01 +00:00
|
|
|
sha1 = "4955b69a913b22f96bd599eff2a133d8d1ed42c6";
|
2009-06-26 16:52:58 +00:00
|
|
|
};
|
|
|
|
|
2012-01-18 20:32:20 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-19 21:31:51 +00:00
|
|
|
mkdir -pv $out
|
2012-01-18 20:32:20 +00:00
|
|
|
mv * $out
|
|
|
|
rm $out/bin/*.{bat,dll,exe,sh}
|
2014-04-22 17:00:09 +00:00
|
|
|
mv $out/COPYING $out/LICENSE* $out/docs
|
2012-01-18 20:32:20 +00:00
|
|
|
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
wrapProgram $i \
|
|
|
|
--set JAVA_HOME ${jre}
|
|
|
|
done
|
|
|
|
'';
|
2009-06-26 16:52:58 +00:00
|
|
|
|
2014-04-22 17:00:09 +00:00
|
|
|
meta = {
|
2010-07-28 11:55:54 +00:00
|
|
|
description = "Ruby interpreter written in Java";
|
2012-01-18 20:32:20 +00:00
|
|
|
homepage = http://jruby.org/;
|
2014-11-06 00:44:33 +00:00
|
|
|
license = with stdenv.lib.licenses; [ cpl10 gpl2 lgpl21 ];
|
2009-06-26 16:52:58 +00:00
|
|
|
};
|
|
|
|
}
|