1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00
nixpkgs/pkgs/development/interpreters/ruby/gem_hook.patch
2016-03-14 23:46:01 +00:00

22 lines
714 B
Diff

diff --git a/rubygems/lib/rubygems/installer.rb b/rubygems/lib/rubygems/installer.rb
index a88d393..8612901 100644
--- a/rubygems/lib/rubygems/installer.rb
+++ b/rubygems/lib/rubygems/installer.rb
@@ -766,7 +766,15 @@ TEXT
# Ensures that files can't be installed outside the gem directory.
def extract_files
- @package.extract_files gem_dir
+ ret = @package.extract_files gem_dir
+ if ENV['NIX_POST_EXTRACT_FILES_HOOK']
+ puts
+ puts "running NIX_POST_EXTRACT_FILES_HOOK #{ENV['NIX_POST_EXTRACT_FILES_HOOK']} #{gem_dir}"
+ system("#{ENV['NIX_POST_EXTRACT_FILES_HOOK']} #{gem_dir}")
+ puts "running NIX_POST_EXTRACT_FILES_HOOK done"
+ puts
+ end
+ ret
end
##