From 7d974e7eef1a5486c1356646852c7a1ed4bf8d39 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Sun, 17 Apr 2016 22:36:40 +0200 Subject: [PATCH] gem-config: fix bundler --- pkgs/development/ruby-modules/gem-config/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 5544a7f88b40..72e483bc77d3 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -166,5 +166,15 @@ in export XAPIAN_CONFIG=${xapian}/bin/xapian-config ''; }; + + # 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"; + }; }