diff --git a/pkgs/development/ruby-modules/bundler/default.nix b/pkgs/development/ruby-modules/bundler/default.nix index 50b8725a0af..c3c544d5268 100644 --- a/pkgs/development/ruby-modules/bundler/default.nix +++ b/pkgs/development/ruby-modules/bundler/default.nix @@ -7,4 +7,8 @@ buildRubyGem rec { version = "1.12.5"; sha256 = "1q84xiwm9j771lpmiply0ls9l2bpvl5axn3jblxjvrldh8di2pkc"; dontPatchShebangs = true; + + postFixup = '' + sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle + ''; } diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 95b5033cc9d..41c837f52f0 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -29,6 +29,21 @@ let in { + bundler = attrs: + let + templates = "${attrs.ruby.gemPath}/gems/${attrs.gemName}-${attrs.version}/lib/bundler/templates/"; + in { + # patching shebangs would fail on the templates/Executable file, so we + # temporarily remove the executable flag. + preFixup = "chmod -x $out/${templates}/Executable"; + postFixup = '' + chmod +x $out/${templates}/Executable + + # Allows to load another bundler version + sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle + ''; + }; + capybara-webkit = attrs: { buildInputs = [ qt48 ]; }; @@ -177,14 +192,5 @@ in ''; }; - # patching shebangs would fail on the templates/Executable file, so we - # temporarily remove the executable flag. - bundler = attrs: - let - templates = "${attrs.ruby.gemPath}/gems/${attrs.gemName}-${attrs.version}/lib/bundler/templates/"; - in { - preFixup = "chmod -x $out/${templates}/Executable"; - postFixup = "chmod +x $out/${templates}/Executable"; - }; }