From 5c6e4ea4beb54ed9470e34d902ac05256b2b2d78 Mon Sep 17 00:00:00 2001 From: Alastair Pharo Date: Mon, 10 Jul 2017 15:11:53 +1000 Subject: [PATCH] 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. --- pkgs/development/interpreters/jruby/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/jruby/default.nix b/pkgs/development/interpreters/jruby/default.nix index 74203eca380..5c5ede3517c 100644 --- a/pkgs/development/interpreters/jruby/default.nix +++ b/pkgs/development/interpreters/jruby/default.nix @@ -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