ruby update:
* xrefresh server on Linux (only paths config option is honored) * sup can be started without hacks now :) * rubygems update 1.3.5 * fix handling of /bin/* ruby scripts * only recognize runtime dependencies when creating nix derivations. Some development dependencies are no longer available. * make ruby lib ffy compile by using NIX_POST_EXTRACT_FILES_HOOK * update rubygems patch: Even if there is a missing dep create attr item. Maybe this missing source can be fixed manually. svn path=/nixpkgs/trunk/; revision=19470
This commit is contained in:
parent
11f8b98ccc
commit
92a0256e8e
@ -1,5 +1,5 @@
|
|||||||
diff --git a/lib/rubygems/command_manager.rb b/lib/rubygems/command_manager.rb
|
diff --git a/lib/rubygems/command_manager.rb b/lib/rubygems/command_manager.rb
|
||||||
index 0a19016..ef66d30 100644
|
index 0a19016..ef66d30 100755
|
||||||
--- a/lib/rubygems/command_manager.rb
|
--- a/lib/rubygems/command_manager.rb
|
||||||
+++ b/lib/rubygems/command_manager.rb
|
+++ b/lib/rubygems/command_manager.rb
|
||||||
@@ -70,6 +70,7 @@ class Gem::CommandManager
|
@@ -70,6 +70,7 @@ class Gem::CommandManager
|
||||||
@ -10,12 +10,13 @@ index 0a19016..ef66d30 100644
|
|||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
diff --git a/lib/rubygems/commands/nix_command.rb b/lib/rubygems/commands/nix_command.rb
|
diff --git a/lib/rubygems/commands/nix_command.rb b/lib/rubygems/commands/nix_command.rb
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..005d5a9
|
index 0000000..24f3479
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/lib/rubygems/commands/nix_command.rb
|
+++ b/lib/rubygems/commands/nix_command.rb
|
||||||
@@ -0,0 +1,226 @@
|
@@ -0,0 +1,229 @@
|
||||||
+require 'net/http'
|
+require 'net/http'
|
||||||
+require 'rubygems/command'
|
+require 'rubygems/command'
|
||||||
+require 'rubygems/doc_manager'
|
+require 'rubygems/doc_manager'
|
||||||
@ -102,7 +103,7 @@ index 0000000..005d5a9
|
|||||||
+ raise Gem::CommandLineError, "could'nt parse arg. expected: name or name-version"
|
+ raise Gem::CommandLineError, "could'nt parse arg. expected: name or name-version"
|
||||||
+ end
|
+ end
|
||||||
+
|
+
|
||||||
+ print "adding gem_name\n"
|
+ puts "adding #{gem_name}\n"
|
||||||
+
|
+
|
||||||
+ adddep(Gem::Dependency.new gem_name, version)
|
+ adddep(Gem::Dependency.new gem_name, version)
|
||||||
+ }
|
+ }
|
||||||
@ -183,8 +184,8 @@ index 0000000..005d5a9
|
|||||||
+ return if @seen[full_name]
|
+ return if @seen[full_name]
|
||||||
+ @seen[full_name] = true # there maybe circular dependencies. thus mark this gem seen as early as possible
|
+ @seen[full_name] = true # there maybe circular dependencies. thus mark this gem seen as early as possible
|
||||||
+
|
+
|
||||||
+ # distinguish runtime / buildtime deps? (TODO)
|
+ # development deps can't be found. Some are old. Thus only add rutime dependencies
|
||||||
+ deps = gem[0].dependencies
|
+ deps = gem[0].dependencies.find_all { |d| d.type == :runtime }
|
||||||
+
|
+
|
||||||
+ print " total deps of #{full_name}: #{deps.length}\n"
|
+ print " total deps of #{full_name}: #{deps.length}\n"
|
||||||
+
|
+
|
||||||
@ -227,13 +228,16 @@ index 0000000..005d5a9
|
|||||||
+
|
+
|
||||||
+ if cash[src].nil? then
|
+ if cash[src].nil? then
|
||||||
+ tmp="/tmp/ruby-gems-nix-tmp-file"
|
+ tmp="/tmp/ruby-gems-nix-tmp-file"
|
||||||
+ raise Gem::DependencyError("could'nt nix-prefetch #{src}") \
|
+ system("nix-prefetch-url #{src.gsub(/([:= `$;])/,'\\\\\1')} > #{tmp} 2>/dev/null")
|
||||||
+ if (not system("nix-prefetch-url #{src.gsub(/([:= `$;])/,'\\\\\1')} > #{tmp} 2>/dev/null")) || $? != 0
|
+ if $? == 0
|
||||||
+ file = File.new(tmp)
|
+ file = File.new(tmp)
|
||||||
+ hash = file.readlines().first().split("\n")[0] # remove trailing \n
|
+ hash = file.readlines().first().split("\n")[0] # remove trailing \n
|
||||||
+ file.close()
|
+ file.close()
|
||||||
+ File.delete(tmp)
|
+ File.delete(tmp)
|
||||||
+ cash[src] = hash
|
+ cash[src] = hash
|
||||||
|
+ else
|
||||||
|
+ cash[src] = "no hash"
|
||||||
|
+ end
|
||||||
+
|
+
|
||||||
+ File.open(cashfile, "w+") do |f| Marshal.dump(cash, f) end
|
+ File.open(cashfile, "w+") do |f| Marshal.dump(cash, f) end
|
||||||
+ end
|
+ end
|
||||||
@ -242,3 +246,22 @@ index 0000000..005d5a9
|
|||||||
+ end
|
+ end
|
||||||
+
|
+
|
||||||
+end
|
+end
|
||||||
|
|
||||||
|
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
|
||||||
|
index d1ef3cb..bf15652 100755
|
||||||
|
--- a/lib/rubygems/installer.rb
|
||||||
|
+++ b/lib/rubygems/installer.rb
|
||||||
|
@@ -545,6 +545,13 @@ Results logged to #{File.join(Dir.pwd, 'gem_make.out')}
|
||||||
|
|
||||||
|
say path if Gem.configuration.really_verbose
|
||||||
|
end
|
||||||
|
+
|
||||||
|
+ if !ENV['NIX_POST_EXTRACT_FILES_HOOK'].nil?
|
||||||
|
+ print "\nrunning NIX_POST_EXTRACT_FILES_HOOK #{ENV['NIX_POST_EXTRACT_FILES_HOOK']} #{@gem_dir}\n"
|
||||||
|
+ print `#{ENV['NIX_POST_EXTRACT_FILES_HOOK']} #{@gem_dir}`
|
||||||
|
+ print "\nrunning NIX_POST_EXTRACT_FILES_HOOK done\n"
|
||||||
|
+ end
|
||||||
|
+
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
@ -4,22 +4,24 @@ rec {
|
|||||||
# some packages (eg ruby-debug) still require 1.8. So let's stick to that for
|
# some packages (eg ruby-debug) still require 1.8. So let's stick to that for
|
||||||
# now if nobody has different requirements
|
# now if nobody has different requirements
|
||||||
|
|
||||||
version = "1.3.4";
|
version = "1.3.5";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz";
|
url = "http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz";
|
||||||
sha256 = "1z5vvwdf7cwiq669amfxzqd88bn576yq6d9c5c6c92fm9sib1d0y";
|
sha256 = "1b26fn9kmyd6394m1gqppi10xyf1hac85lvsynsxzpjlmv0qr4n0";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
buildInputs = [ruby makeWrapper];
|
buildInputs = [ruby makeWrapper];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
|
|
||||||
doInstall = fullDepEntry (''
|
doInstall = fullDepEntry (''
|
||||||
ruby setup.rb --prefix=$out/
|
ruby setup.rb --prefix=$out/
|
||||||
wrapProgram $out/bin/gem --prefix RUBYLIB : $out/lib:$out/lib
|
wrapProgram $out/bin/gem --prefix RUBYLIB : $out/lib:$out/lib
|
||||||
|
find $out -type f -name "*.rb" | xargs sed -i "s@/usr/bin/env@$(type -p env)@g"
|
||||||
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
||||||
|
|
||||||
/* doConfigure should be specified separately */
|
/* doConfigure should be specified separately */
|
||||||
phaseNames = ["doInstall"];
|
phaseNames = ["doPatch" "doInstall"];
|
||||||
|
|
||||||
name = "rubygems-" + version;
|
name = "rubygems-" + version;
|
||||||
meta = {
|
meta = {
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user