ruby: cache gem files

This commit is contained in:
Charles Strahan 2015-01-14 04:20:50 -05:00
parent 32bae8d09a
commit aaa2e9705a
1 changed files with 8 additions and 0 deletions

View File

@ -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
'';