diff --git a/src/lib/Hydra/Helper/CatalystUtils.pm b/src/lib/Hydra/Helper/CatalystUtils.pm index d36dd706..165a6413 100644 --- a/src/lib/Hydra/Helper/CatalystUtils.pm +++ b/src/lib/Hydra/Helper/CatalystUtils.pm @@ -123,10 +123,16 @@ sub getChannelData { # `--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; $c->stash->{nixPkgs}->{"${pkgName}.nixpkg"} = {build => $build, name => $pkgName}; + # Put the system type in the manifest (for top-level paths) as + # a hint to the binary patch generator. (It shouldn't try to + # generate patches between builds for different systems.) It + # would be nice if Nix stored this info for every path but it + # doesn't. + $c->stash->{systemForPath}->{$build->outpath} = $build->system; }; $c->stash->{storePaths} = [@storePaths]; diff --git a/src/lib/Hydra/View/NixManifest.pm b/src/lib/Hydra/View/NixManifest.pm index 8a672084..94301119 100644 --- a/src/lib/Hydra/View/NixManifest.pm +++ b/src/lib/Hydra/View/NixManifest.pm @@ -33,6 +33,8 @@ sub process { my $url = $c->stash->{narBase} . "/" . $escaped; + my $system = $c->stash->{systemForPath}->{$path}; + $manifest .= "{\n" . " StorePath: $path\n" . @@ -41,6 +43,7 @@ sub process { " NarURL: $url\n" . " NarHash: $hash\n" . ($narSize != 0 ? " NarSize: $narSize\n" : "") . + (defined $system ? " System: $system\n" : "") . "}\n"; }