mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 04:33:57 +00:00
5c6e4ea4be
Other executables all invoke jruby, and so don't need to be wrapped. In some cases wrapping breaks the executables because one file is a ruby script that directly loads the other (e.g. `gem` is a wrapper that loads `jgem`). In this case, if the latter script has been wrapped by nix, loading will fail.
34 lines
815 B
Nix
34 lines
815 B
Nix
{ stdenv, fetchurl, makeWrapper, jre }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "jruby-${version}";
|
|
|
|
version = "9.1.12.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz";
|
|
sha256 = "15x5w4awy8h6xfkbj0p4xnb68xzfrss1rf2prk0kzk5kyjakrcnx";
|
|
};
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -pv $out/docs
|
|
mv * $out
|
|
rm $out/bin/*.{bat,dll,exe,sh}
|
|
mv $out/COPYING $out/LICENSE* $out/docs
|
|
|
|
for i in $out/bin/jruby{,.bash}; do
|
|
wrapProgram $i \
|
|
--set JAVA_HOME ${jre}
|
|
done
|
|
'';
|
|
|
|
meta = {
|
|
description = "Ruby interpreter written in Java";
|
|
homepage = http://jruby.org/;
|
|
license = with stdenv.lib.licenses; [ cpl10 gpl2 lgpl21 ];
|
|
platforms = stdenv.lib.platforms.unix;
|
|
};
|
|
}
|