jruby: only wrap jruby executables

Other executables all invoke jruby, and so don't need to be wrapped.

In some cases wrapping breaks the executables because one file is a ruby
script that directly loads the other (e.g. `gem` is a wrapper that loads
`jgem`).  In this case, if the latter script has been wrapped by nix,
loading will fail.
This commit is contained in:
Alastair Pharo 2017-07-10 15:11:53 +10:00
parent c9f487ac5d
commit 5c6e4ea4be

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
rm $out/bin/*.{bat,dll,exe,sh}
mv $out/COPYING $out/LICENSE* $out/docs
for i in $out/bin/*; do
for i in $out/bin/jruby{,.bash}; do
wrapProgram $i \
--set JAVA_HOME ${jre}
done