buildEnv: Pass the right number of args to addPkg

Regression introduced by 4529ed1259.

I've missed this in #5096, not because of a messed up rebase as I have
guessed from a comment on #12635 but missed this in the first place.

The testing I did while working on the pull request weren't exhaustive
enough to cover this, because I haven't tested with packages that use
the propagatedUserEnvPkgs attribute.

In order to make the test a bit more exhaustive this time, let's test it
using:

nix-build -E 'with import ./. {}; buildEnv {
  name = "testenv";
  paths = [
    pkgs.hello pkgs.binutils pkgs.libsoup pkgs.gnome3.yelp
    pkgs.gnome3.totem
  ];
}'

And with this commit the errors no longer show up and the environment is
built correctly.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Fixes: #12635
This commit is contained in:
aszlig 2016-01-27 12:44:56 +01:00
parent b205b587e7
commit ab84149c99
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -169,7 +169,7 @@ while (scalar(keys %postponed) > 0) {
my @pkgDirs = keys %postponed;
%postponed = ();
foreach my $pkgDir (sort @pkgDirs) {
addPkg($pkgDir, 2, $priorityCounter++);
addPkg($pkgDir, 2, $ENV{"checkCollisionContents"} eq "1", $priorityCounter++);
}
}