diff --git a/pkgs/build-support/vm/deb/deb-closure.pl b/pkgs/build-support/vm/deb/deb-closure.pl index 887077037e28..bed397d6f07e 100644 --- a/pkgs/build-support/vm/deb/deb-closure.pl +++ b/pkgs/build-support/vm/deb/deb-closure.pl @@ -46,17 +46,27 @@ sub getDeps { } -# Process the "Provides" fields to be able to resolve virtual dependencies. +# Process the "Provides" and "Replaces" fields to be able to resolve +# virtual dependencies. my %provides; foreach my $cdata (values %packages) { - next unless defined $cdata->{Provides}; - my @provides = getDeps(Dpkg::Deps::deps_parse($cdata->{Provides})); - foreach my $name (@provides) { - #die "conflicting provide: $name\n" if defined $provides{$name}; - #warn "provide by $cdata->{Package} conflicts with package with the same name: $name\n"; - next if defined $packages{$name}; - $provides{$name} = $cdata->{Package}; + if (defined $cdata->{Provides}) { + my @provides = getDeps(Dpkg::Deps::deps_parse($cdata->{Provides})); + foreach my $name (@provides) { + #die "conflicting provide: $name\n" if defined $provides{$name}; + #warn "provide by $cdata->{Package} conflicts with package with the same name: $name\n"; + next if defined $packages{$name}; + $provides{$name} = $cdata->{Package}; + } + } + # Treat "Replaces" like "Provides". + if (defined $cdata->{Replaces}) { + my @replaces = getDeps(Dpkg::Deps::deps_parse($cdata->{Replaces})); + foreach my $name (@replaces) { + next if defined $packages{$name}; + $provides{$name} = $cdata->{Package}; + } } } diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 68ecb512901d..86b15ff91553 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -1422,6 +1422,28 @@ rec { packages = commonDebianPackages; }; + debian70i386 = { + name = "debian-7.0.0-wheezy-i386"; + fullName = "Debian 7.0.0 Wheezy (i386)"; + packagesList = fetchurl { + url = mirror://debian/dists/wheezy/main/binary-i386/Packages.bz2; + sha256 = "712939639e2cc82615c85bdf81edf31edef0fda003ac2b32998e438aee403ab8"; + }; + urlPrefix = mirror://debian; + packages = commonDebianPackages; + }; + + debian70x86_64 = { + name = "debian-7.0.0-wheezy-amd64"; + fullName = "Debian 7.0.0 Wheezy (amd64)"; + packagesList = fetchurl { + url = mirror://debian/dists/wheezy/main/binary-amd64/Packages.bz2; + sha256 = "e79132f7db6655013be1f75feb9812b071386525246d8639679b322487d2732a"; + }; + urlPrefix = mirror://debian; + packages = commonDebianPackages; + }; + }; @@ -1485,6 +1507,7 @@ rec { "bzip2" "tar" "grep" + "sed" "findutils" "g++" "make"