@@ -29,6 +29,21 @@ let
2929in
3030
3131{
32+ bundler = attrs:
33+ let
34+ templates = "${attrs.ruby.gemPath}/gems/${attrs.gemName}-${attrs.version}/lib/bundler/templates/";
35+ in {
36+ # patching shebangs would fail on the templates/Executable file, so we
37+ # temporarily remove the executable flag.
38+ preFixup = "chmod -x $out/${templates}/Executable";
39+ postFixup = ''
40+ chmod +x $out/${templates}/Executable
41+
42+ # Allows to load another bundler version
43+ sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle
44+ '';
45+ };
46+
3247 capybara-webkit = attrs: {
3348 buildInputs = [ qt48 ];
3449 };
@@ -177,14 +192,5 @@ in
177192 '';
178193 };
179194
180− # patching shebangs would fail on the templates/Executable file, so we
181− # temporarily remove the executable flag.
182− bundler = attrs:
183− let
184− templates = "${attrs.ruby.gemPath}/gems/${attrs.gemName}-${attrs.version}/lib/bundler/templates/";
185− in {
186− preFixup = "chmod -x $out/${templates}/Executable";
187− postFixup = "chmod +x $out/${templates}/Executable";
188− };
189195}
190196