remove old stuff

This commit is contained in:
Charles Strahan 2014-10-27 22:16:00 +00:00
parent 9eedf0f218
commit 1eb31c0838
4 changed files with 0 additions and 2586 deletions

View File

@ -1,35 +0,0 @@
diff --git a/lib/nix/gem-nix-command.rb b/lib/nix/gem-nix-command.rb
index 8d3733e..ba942ff 100644
--- a/lib/nix/gem-nix-command.rb
+++ b/lib/nix/gem-nix-command.rb
@@ -108,11 +108,12 @@ class Gem::Commands::NixCommand < Gem::Command
# args to dep informations
args.each { |arg|
- if arg =~ /(.+)-?(.*)?/ then
+ if arg =~ /(.+)-([0-9][^-]+)/ then
gem_name = $1
- version = $2.empty? ? Gem::Requirement.default : Gem::Version.new($2)
+ version = Gem::Version.new($2)
else
- raise Gem::CommandLineError, "couldn't parse arg. expected: name or name-version"
+ gem_name = arg
+ version = Gem::Requirement.default
end
adddep(Gem::Dependency.new gem_name, version)
@@ -162,7 +163,13 @@ class Gem::Commands::NixCommand < Gem::Command
spec, source_uri = find_gem_with_source(dep)
full_name = spec.full_name
- return if @gems_with_deps.key?(full_name)
+ if @gems_with_deps.key?(full_name)
+ unless @gems_with_deps[full_name].nil?
+ return @gems_with_deps[full_name][0]
+ else
+ return nil
+ end
+ end
@gems_with_deps[full_name] = nil # there maybe circular dependencies. thus mark this gem seen as early as possible
# development deps can't be found. Some are old. Thus only add rutime dependencies

File diff suppressed because it is too large Load Diff

View File

@ -1,45 +0,0 @@
{ stdenv, config, fetchurl, callPackage }:
let
inherit (stdenv.lib) fold optional;
gemsMergeableFun = { generatedFuns ? [], patchFuns ? [], overrideFuns ? [] }:
let
generatedAttrs = map (f: f customGems) generatedFuns;
generatedGems = map (a: a.gems) generatedAttrs;
gem = callPackage ./gem.nix {
patches = map (f: callPackage f { inherit gems; }) patchFuns;
overrides = map (f: callPackage f { }) overrideFuns;
};
customGems = stdenv.lib.mapAttrs gem (fold (x: y: x // y) { } generatedGems);
gems = fold (x: y: x // y) customGems (map (a: a.aliases) generatedAttrs);
in
gems // {
merge = { generated ? null, patches ? null, overrides ? null }:
gemsMergeableFun {
generatedFuns = generatedFuns ++ optional (generated != null) generated;
patchFuns = patchFuns ++ optional (patches != null) patches;
overrideFuns = overrideFuns ++ optional (overrides != null) overrides;
};
};
in
((gemsMergeableFun { }).merge {
generated = import ./generated.nix;
patches = import ./patches.nix;
overrides = import ./overrides.nix;
}).merge (
let
localGemDir = (builtins.getEnv "HOME") + "/.nixpkgs/gems/";
getLocalGemFun = name:
let
file = localGemDir + name + ".nix";
fallback =
if builtins.pathExists file then import (builtins.toPath file)
else null;
in
stdenv.lib.attrByPath [ "gems" name ] fallback config;
in
{
generated = getLocalGemFun "generated";
patches = getLocalGemFun "patches";
overrides = getLocalGemFun "overrides";
})

View File

@ -1,5 +0,0 @@
{ xapianBindings }:
{
xapian_full = xapianBindings.merge { cfg = { rubySupport = true; }; };
}