* Add derivations and all build-time dependencies of a build to the
Hydra channels. This includes sources.
This commit is contained in:
parent
a2a041303f
commit
4b0bc65cbb
|
@ -265,7 +265,7 @@ sub nix : Chained('build') PathPart('nix') CaptureArgs(0) {
|
|||
notFound($c, "Path " . $build->outpath . " is no longer available.")
|
||||
unless isValidPath($build->outpath);
|
||||
|
||||
$c->stash->{storePaths} = [$build->outpath];
|
||||
$c->stash->{storePaths} = [$build->drvpath];
|
||||
|
||||
my $pkgName = $build->nixname . "-" . $build->system;
|
||||
$c->stash->{nixPkgs} = {"${pkgName}.nixpkg" => {build => $build, name => $pkgName}};
|
||||
|
|
|
@ -70,7 +70,13 @@ sub getChannelData {
|
|||
my @storePaths = ();
|
||||
foreach my $build (@builds2) {
|
||||
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;
|
||||
}
|
||||
my $pkgName = $build->nixname . "-" . $build->system . "-" . $build->id;
|
||||
$c->stash->{nixPkgs}->{"${pkgName}.nixpkg"} = {build => $build, name => $pkgName};
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ sub process {
|
|||
|
||||
$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;
|
||||
|
||||
my $manifest =
|
||||
|
|
Loading…
Reference in a new issue