Merge remote-tracking branch 'upstream/master' into HEAD
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{ mkDerivation }:
|
||||
|
||||
mkDerivation rec {
|
||||
version = "1.5.0-rc.1";
|
||||
sha256 = "1aqbhyzwjqg57f99kwqzxkk4gjaqgwb7nmgpgdp7psa0ly742i9q";
|
||||
version = "1.5.0-rc.2";
|
||||
sha256 = "0wfxsfz1qbb6iapg8j1qskva6j4mccxqvv79xbz08fzzb6n1wvxa";
|
||||
minimumOTPVersion = "18";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{ stdenv, fetchurl, makeWrapper, jre }:
|
||||
{ stdenv, callPackage, fetchurl, makeWrapper, jre }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
let
|
||||
# The version number here is whatever is reported by the RUBY_VERSION string
|
||||
rubyVersion = callPackage ../ruby/ruby-version.nix {} "2" "3" "3" "";
|
||||
jruby = stdenv.mkDerivation rec {
|
||||
name = "jruby-${version}";
|
||||
|
||||
version = "9.1.12.0";
|
||||
@@ -18,16 +21,42 @@ stdenv.mkDerivation rec {
|
||||
rm $out/bin/*.{bat,dll,exe,sh}
|
||||
mv $out/COPYING $out/LICENSE* $out/docs
|
||||
|
||||
for i in $out/bin/*; do
|
||||
for i in $out/bin/jruby{,.bash}; do
|
||||
wrapProgram $i \
|
||||
--set JAVA_HOME ${jre}
|
||||
done
|
||||
|
||||
ln -s $out/bin/jruby $out/bin/ruby
|
||||
|
||||
# Bundler tries to create this directory
|
||||
mkdir -pv $out/${passthru.gemPath}
|
||||
mkdir -p $out/nix-support
|
||||
cat > $out/nix-support/setup-hook <<EOF
|
||||
addGemPath() {
|
||||
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
|
||||
}
|
||||
|
||||
envHooks+=(addGemPath)
|
||||
EOF
|
||||
'';
|
||||
|
||||
passthru = rec {
|
||||
rubyEngine = "jruby";
|
||||
gemPath = "lib/${rubyEngine}/gems/${rubyVersion.libDir}";
|
||||
libPath = "lib/${rubyEngine}/${rubyVersion.libDir}";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Ruby interpreter written in Java";
|
||||
homepage = http://jruby.org/;
|
||||
license = with stdenv.lib.licenses; [ cpl10 gpl2 lgpl21 ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
};
|
||||
in jruby.overrideAttrs (oldAttrs: {
|
||||
passthru = oldAttrs.passthru // {
|
||||
devEnv = callPackage ../ruby/dev.nix {
|
||||
ruby = jruby;
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user