summary refs log tree commit diff
path: root/pkgs/development/ruby-modules/gem-config/default.nix
diff options
context:
space:
mode:
authorMichael Fellinger <m.fellinger@gmail.com>2016-04-17 22:36:40 +0200
committerMichael Fellinger <m.fellinger@gmail.com>2016-04-18 11:12:19 +0200
commit7d974e7eef1a5486c1356646852c7a1ed4bf8d39 (patch)
treec520868824bea4176bb7f0f7dbfacbe8e7b73403 /pkgs/development/ruby-modules/gem-config/default.nix
parent3841029b81710846d8a46824b9bb481410f4a7d2 (diff)
downloadnixpkgs-7d974e7eef1a5486c1356646852c7a1ed4bf8d39.tar
nixpkgs-7d974e7eef1a5486c1356646852c7a1ed4bf8d39.tar.gz
nixpkgs-7d974e7eef1a5486c1356646852c7a1ed4bf8d39.tar.bz2
nixpkgs-7d974e7eef1a5486c1356646852c7a1ed4bf8d39.tar.lz
nixpkgs-7d974e7eef1a5486c1356646852c7a1ed4bf8d39.tar.xz
nixpkgs-7d974e7eef1a5486c1356646852c7a1ed4bf8d39.tar.zst
nixpkgs-7d974e7eef1a5486c1356646852c7a1ed4bf8d39.zip
gem-config: fix bundler
Diffstat (limited to 'pkgs/development/ruby-modules/gem-config/default.nix')
-rw-r--r--pkgs/development/ruby-modules/gem-config/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix
index 5544a7f88b4..72e483bc77d 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";
+    };
 }