nixpkgs/pkgs/development/interpreters/jruby/default.nix
R. RyanTM d58691d38f jruby: 9.1.17.0 -> 9.2.0.0 (#41115)
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/jruby/versions.

These checks were done:

- built on NixOS
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/rake had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/ast had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/jgem had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/jirb had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/jirb_swing had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/gem had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/ri had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/irb had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/testrb had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/rdoc had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/jrubyc had a zero exit code or showed the expected version
- /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/jruby passed the binary check.
- /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/jruby.bash passed the binary check.
- /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/ruby passed the binary check.
- /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/.jruby-wrapped passed the binary check.
- /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0/bin/.jruby.bash-wrapped passed the binary check.
- 5 of 16 passed binary check by having a zero exit code.
- 0 of 16 passed binary check by having the new version present in output.
- found 9.2.0.0 with grep in /nix/store/mxi03kwk4c23xpfjpqv1ggfkyf50wjkn-jruby-9.2.0.0
- directory tree listing: https://gist.github.com/4fecc39e96054dd41278b1d505cdb498
- du listing: https://gist.github.com/6382ad0545e74f9ff62a410b61801232
2018-05-28 21:04:12 +02:00

62 lines
1.6 KiB
Nix

{ stdenv, callPackage, fetchurl, makeWrapper, jre }:
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.2.0.0";
src = fetchurl {
url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz";
sha256 = "1106s1vmcm36gm3vrl1sjrrr2wj6splgik1zrfb7c2y9bzm8swa2";
};
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
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}
}
addEnvHooks "$hostOffset" 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;
};
};
})