diff options
author | Farid Zakaria <fmzakari@google.com> | 2021-03-11 15:59:12 -0800 |
---|---|---|
committer | Farid Zakaria <fmzakari@google.com> | 2021-03-11 16:10:22 -0800 |
commit | bfcd4b0e2a96be68d5142fda63e04da979e8b0ae (patch) | |
tree | f68821da97193cf68cb75b7ed0338179642d4575 /pkgs/development/interpreters | |
parent | 0867f62742476f513e39113e643d9f1612b31133 (diff) |
jruby: Fix JAVA_HOME to support proper jmod support
This is investigation I've done in support of https://github.com/jruby/jruby/issues/6608 where I noticed some funky issues with JRuby and module loading. Looks like that JRuby expects JAVA_HOME to have a directory called `jmod`, which is consistent with the Java Module system. Unfortunately, the top level directory for the `jre` or `jdk` /nix/store entry is not a valid JAVA_HOME since it is missing that directory. Instead it's set within `lib/openjdk`, and there is a passthru variable set accordingly. This fixes JRuby and follows many other derivations. A simple search in the code-base shows that there are many other packages that suffer this same bug.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r-- | pkgs/development/interpreters/jruby/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/jruby/default.nix b/pkgs/development/interpreters/jruby/default.nix index 4d8771b93ebc4..13fe4a73d4218 100644 --- a/pkgs/development/interpreters/jruby/default.nix +++ b/pkgs/development/interpreters/jruby/default.nix @@ -23,7 +23,7 @@ jruby = stdenv.mkDerivation rec { for i in $out/bin/jruby{,.bash}; do wrapProgram $i \ - --set JAVA_HOME ${jre} + --set JAVA_HOME ${jre.home} done ln -s $out/bin/jruby $out/bin/ruby |