diff --git a/pkgs/development/interpreters/jruby/default.nix b/pkgs/development/interpreters/jruby/default.nix index e421f40824c0..7c329f56fedc 100644 --- a/pkgs/development/interpreters/jruby/default.nix +++ b/pkgs/development/interpreters/jruby/default.nix @@ -1,43 +1,44 @@ -{ lib, stdenv, callPackage, fetchurl, makeWrapper, jre }: +{ lib, stdenv, callPackage, fetchurl, mkRubyVersion, makeBinaryWrapper, jre }: let -# The version number here is whatever is reported by the RUBY_VERSION string -rubyVersion = callPackage ../ruby/ruby-version.nix {} "2" "5" "7" ""; -jruby = stdenv.mkDerivation rec { + # The version number here is whatever is reported by the RUBY_VERSION string + rubyVersion = mkRubyVersion "3" "1" "4" ""; +in +stdenv.mkDerivation (finalAttrs: { pname = "jruby"; - - version = "9.3.9.0"; + version = "9.4.3.0"; src = fetchurl { - url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz"; - sha256 = "sha256-JR5t2NHS+CkiyMd414V+G++C/lyiz3e8CTVkIdCwWrg="; + url = "https://s3.amazonaws.com/jruby.org/downloads/${finalAttrs.version}/jruby-bin-${finalAttrs.version}.tar.gz"; + hash = "sha256-sJfgjFZp6KGIKI4RORHRK0rSvWeiwgnW36hEXWOk2Mk="; }; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeBinaryWrapper ]; installPhase = '' - mkdir -pv $out/docs - mv * $out - rm $out/bin/*.{bat,dll,exe,sh} - mv $out/COPYING $out/LICENSE* $out/docs + mkdir -pv $out/share/jruby/docs + mv * $out + rm $out/bin/*.{bat,dll,exe,sh} + mv $out/samples $out/share/jruby/ + mv $out/BSDL $out/COPYING $out/LEGAL $out/LICENSE* $out/share/jruby/docs/ - for i in $out/bin/jruby{,.bash}; do - wrapProgram $i \ - --set JAVA_HOME ${jre.home} - done + for i in $out/bin/jruby; do + wrapProgram $i \ + --set JAVA_HOME ${jre.home} + done - ln -s $out/bin/jruby $out/bin/ruby + 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 < $out/nix-support/setup-hook <