diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-03-07T13·27+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-03-07T13·27+0000 |
commit | 543d7a41dcb76406e433fde7f5e26c61ac65cc3c (patch) | |
tree | f1ef80b9d83361745db56c074eaf8d163b78704e /corepkgs/buildenv | |
parent | 9a7f95882c5e32ad5c41799016f749964221cad4 (diff) |
* Automatically add propagated build inputs to user environments.
Maybe this is a bad idea.
Diffstat (limited to 'corepkgs/buildenv')
-rwxr-xr-x | corepkgs/buildenv/builder.pl.in | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/corepkgs/buildenv/builder.pl.in b/corepkgs/buildenv/builder.pl.in index d6dd2f4cf9bb..a1914f658f30 100755 --- a/corepkgs/buildenv/builder.pl.in +++ b/corepkgs/buildenv/builder.pl.in @@ -25,6 +25,7 @@ sub createLinks { if ($srcFile =~ /\/propagated-build-inputs$/ || $srcFile =~ /\/nix-support$/ || + $srcFile =~ /\/perllocal.pod$/ || $srcFile =~ /\/log$/) { # Do nothing. @@ -72,13 +73,27 @@ sub createLinks { my %done; +sub addPkg; sub addPkg { my $pkgDir = shift; return if (defined $done{$pkgDir}); $done{$pkgDir} = 1; + print "adding $pkgDir\n"; createLinks("$pkgDir", "$out"); + + my $propagatedFN = "$pkgDir/nix-support/propagated-build-inputs"; + if (-e $propagatedFN) { + open PROP, "<$propagatedFN" or die; + my $propagated = <PROP>; + close PROP; + my @propagated = split ' ', $propagated; + foreach my $p (@propagated) { + addPkg $p; + } + } + } @@ -86,7 +101,6 @@ my @args = split ' ', $ENV{"derivations"}; while (scalar @args > 0) { my $drvPath = shift @args; - print "adding $drvPath\n"; addPkg($drvPath); } |