nixpkgs/pkgs/development/interpreters/ruby/gem_hook.patch

22 lines
714 B
Diff
Raw Normal View History

diff --git a/rubygems/lib/rubygems/installer.rb b/rubygems/lib/rubygems/installer.rb
2016-03-14 23:28:55 +00:00
index a88d393..8612901 100644
--- a/rubygems/lib/rubygems/installer.rb
+++ b/rubygems/lib/rubygems/installer.rb
2016-03-14 23:28:55 +00:00
@@ -766,7 +766,15 @@ TEXT
# Ensures that files can't be installed outside the gem directory.
2016-03-14 23:28:55 +00:00
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
2016-03-14 23:28:55 +00:00
+ ret
end
##