{ 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 <