From aaa2e9705ab1bcfebc14f598ae60237749e75033 Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Wed, 14 Jan 2015 04:20:50 -0500 Subject: [PATCH] ruby: cache gem files --- pkgs/development/interpreters/ruby/gem.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/interpreters/ruby/gem.nix b/pkgs/development/interpreters/ruby/gem.nix index 084d0fdb466..ec263d568b8 100644 --- a/pkgs/development/interpreters/ruby/gem.nix +++ b/pkgs/development/interpreters/ruby/gem.nix @@ -113,6 +113,14 @@ stdenv.mkDerivation (attrs // { fi EOF + # Copy the gem file to the cache. + # This is very important in order for many parts of Bundler to not blow up. + # See https://github.com/bundler/bundler/issues/3327 + gemname=$(basename $out/${ruby.gemPath}/gems/*).gem + echo "caching $gemname" + mkdir $out/${ruby.gemPath}/cache + cp $gempkg $out/${ruby.gemPath}/cache/$gemname + runHook postInstall '';