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

33 lines
730 B
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, jre }:
2014-04-22 17:00:09 +00:00
stdenv.mkDerivation rec {
name = "jruby-${version}";
version = "1.7.12";
src = fetchurl {
2014-04-22 17:00:09 +00:00
url = "http://jruby.org.s3.amazonaws.com/downloads/${version}/jruby-bin-${version}.tar.gz";
sha1 = "056cee1138e49da40a77f179b771372692479002";
};
buildInputs = [ makeWrapper ];
installPhase = ''
mkdir -pv $out
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 = "CPL-1.0 GPL-2 LGPL-2.1"; # one of those
};
}