diff options
Diffstat (limited to 'corepkgs/buildenv')
-rwxr-xr-x | corepkgs/buildenv/builder.pl.in | 11 | ||||
-rw-r--r-- | corepkgs/buildenv/default.nix | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/corepkgs/buildenv/builder.pl.in b/corepkgs/buildenv/builder.pl.in index 57fa56903bc1..faebe27cc2a1 100755 --- a/corepkgs/buildenv/builder.pl.in +++ b/corepkgs/buildenv/builder.pl.in @@ -108,10 +108,15 @@ sub addPkg { # Symlink to the packages that have been installed explicitly by the user. -my @args = split ' ', $ENV{"derivations"}; +my @paths = split ' ', $ENV{"derivations"}; +my @active = split ' ', $ENV{"active"}; -foreach my $pkgDir (sort @args) { - addPkg($pkgDir, 0); +die if scalar @paths != scalar @active; + +for (my $n = 0; $n < scalar @paths; $n++) { + my $pkgDir = $paths[$n]; + my $isActive = $active[$n]; + addPkg($pkgDir, 0) if $isActive ne "false"; } diff --git a/corepkgs/buildenv/default.nix b/corepkgs/buildenv/default.nix index 9bc704d8d511..a5452db5ea89 100644 --- a/corepkgs/buildenv/default.nix +++ b/corepkgs/buildenv/default.nix @@ -6,4 +6,7 @@ derivation { builder = ./builder.pl; derivations = derivations; manifest = manifest; + + # !!! grmbl, need structured data for passing this in a clean way. + active = map (x: if x ? meta && x.meta ? active then x.meta.active else "true") derivations; } |