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

34 lines
803 B
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, jre }:
2014-04-22 17:00:09 +00:00
stdenv.mkDerivation rec {
name = "jruby-${version}";
2017-07-14 07:19:18 +00:00
version = "9.1.12.0";
src = fetchurl {
2016-02-11 23:31:41 +00:00
url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz";
2017-07-14 07:19:18 +00:00
sha256 = "15x5w4awy8h6xfkbj0p4xnb68xzfrss1rf2prk0kzk5kyjakrcnx";
};
buildInputs = [ makeWrapper ];
installPhase = ''
2016-02-11 23:31:41 +00:00
mkdir -pv $out/docs
mv * $out
rm $out/bin/*.{bat,dll,exe,sh}
2014-04-22 17:00:09 +00:00
mv $out/COPYING $out/LICENSE* $out/docs
for i in $out/bin/*; do
wrapProgram $i \
--set JAVA_HOME ${jre}
done
'';
2014-04-22 17:00:09 +00:00
meta = {
description = "Ruby interpreter written in Java";
homepage = http://jruby.org/;
license = with stdenv.lib.licenses; [ cpl10 gpl2 lgpl21 ];
platforms = stdenv.lib.platforms.unix;
};
}