* Add derivations and all build-time dependencies of a build to the

Hydra channels.  This includes sources.
This commit is contained in:
Eelco Dolstra 2010-01-19 16:47:32 +00:00
parent a2a041303f
commit 4b0bc65cbb
3 changed files with 9 additions and 3 deletions

View File

@ -265,7 +265,7 @@ sub nix : Chained('build') PathPart('nix') CaptureArgs(0) {
notFound($c, "Path " . $build->outpath . " is no longer available.") notFound($c, "Path " . $build->outpath . " is no longer available.")
unless isValidPath($build->outpath); unless isValidPath($build->outpath);
$c->stash->{storePaths} = [$build->outpath]; $c->stash->{storePaths} = [$build->drvpath];
my $pkgName = $build->nixname . "-" . $build->system; my $pkgName = $build->nixname . "-" . $build->system;
$c->stash->{nixPkgs} = {"${pkgName}.nixpkg" => {build => $build, name => $pkgName}}; $c->stash->{nixPkgs} = {"${pkgName}.nixpkg" => {build => $build, name => $pkgName}};

View File

@ -70,7 +70,13 @@ sub getChannelData {
my @storePaths = (); my @storePaths = ();
foreach my $build (@builds2) { foreach my $build (@builds2) {
next unless isValidPath($build->outpath); next unless isValidPath($build->outpath);
if (isValidPath($build->drvpath)) {
# Adding `drvpath' implies adding `outpath' because of the
# `--include-outputs' flag passed to `nix-store'.
push @storePaths, $build->drvpath;
} else {
push @storePaths, $build->outpath; push @storePaths, $build->outpath;
}
my $pkgName = $build->nixname . "-" . $build->system . "-" . $build->id; my $pkgName = $build->nixname . "-" . $build->system . "-" . $build->id;
$c->stash->{nixPkgs}->{"${pkgName}.nixpkg"} = {build => $build, name => $pkgName}; $c->stash->{nixPkgs}->{"${pkgName}.nixpkg"} = {build => $build, name => $pkgName};
}; };

View File

@ -12,7 +12,7 @@ sub process {
$c->response->content_type('text/x-nix-manifest'); $c->response->content_type('text/x-nix-manifest');
my @paths = split '\n', `nix-store --query --requisites @storePaths`; my @paths = split '\n', `nix-store --query --requisites --include-outputs @storePaths`;
die "cannot query dependencies of path(s) @storePaths: $?" if $? != 0; die "cannot query dependencies of path(s) @storePaths: $?" if $? != 0;
my $manifest = my $manifest =