diff options
author | Farid Zakaria <fmzakari@google.com> | 2020-09-24 16:33:43 -0700 |
---|---|---|
committer | Farid Zakaria <fmzakari@google.com> | 2020-09-24 17:57:17 -0700 |
commit | 8da7bd63ca2b2e84bf14540312ffc818715cfec6 (patch) | |
tree | 7323b99aa7d2cdce544ceef767b629f09800b8dd /pkgs/development/interpreters/jruby | |
parent | 638c8cb2d56be72e8842a8a4262af7b559cb7111 (diff) |
jruby: fix shebang for binaries in JRuby
There are a variety of additional scripts that are included with the JRuby installation that use JRuby itself. For instance the `bin/gem` had the following contents: ```bash ❯ cat /nix/store/kglkqf56ii83yl6yrgcaj5r3s9m2fzr0-jruby-9.2.13.0/bin/gem load File.join(File.dirname(__FILE__), 'jgem') ``` This is clearly wrong. Patchshebangs was not picking up the fix as part of stdenv because the patch is not a build input but the final output itself. We have to rely on substituteInPlace so that we get the correct version. ```bash ❯ cat /nix/store/k4fnrn0dcsh2wzw81217r0ywsspb468f-jruby-9.2.13.0/bin/gem ```
Diffstat (limited to 'pkgs/development/interpreters/jruby')
-rw-r--r-- | pkgs/development/interpreters/jruby/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/jruby/default.nix b/pkgs/development/interpreters/jruby/default.nix index e4511da498c7a..8d27bfb64f8b4 100644 --- a/pkgs/development/interpreters/jruby/default.nix +++ b/pkgs/development/interpreters/jruby/default.nix @@ -40,6 +40,10 @@ jruby = stdenv.mkDerivation rec { EOF ''; + postFixup = '' + PATH=$out/bin:$PATH patchShebangs $out/bin + ''; + passthru = rec { rubyEngine = "jruby"; gemPath = "lib/${rubyEngine}/gems/${rubyVersion.libDir}"; |