* Only put Nix builds in the global channel.

This commit is contained in:
Eelco Dolstra 2009-02-27 14:57:06 +00:00
parent abba2e62b4
commit c8ad58a774
3 changed files with 5 additions and 3 deletions

View file

@ -116,10 +116,10 @@ sub nix : Chained('build') PathPart('nix') CaptureArgs(0) {
my $build = $c->stash->{build};
error($c, "Build cannot be downloaded as a closure or Nix package.")
notFound($c, "Build cannot be downloaded as a closure or Nix package.")
if !$build->buildproducts->find({type => "nix-build"});
error($c, "Path " . $build->outpath . " is no longer available.")
notFound($c, "Path " . $build->outpath . " is no longer available.")
unless isValidPath($build->outpath);
$c->stash->{storePaths} = [$build->outpath];

View file

@ -552,6 +552,8 @@ sub nix : Chained('/') PathPart('nix') CaptureArgs(0) {
my @storePaths = ();
foreach my $build (@builds) {
# !!! better do this in getLatestBuilds with a join.
next unless $build->buildproducts->find({type => "nix-build"});
push @storePaths, $build->outpath if isValidPath($build->outpath);
};

View file

@ -17,7 +17,7 @@ sub process {
my $manifest =
"version {\n" .
" ManifestVersion: 3\n" .
" ManifestVersion: 4\n" .
"}\n";
foreach my $path (@paths) {