XHVZXX6NVBQCZQ2GL2AQ6QDIJMERIY6OF74KSTQL67BGXG3TFIXQC
ZRBXLKFOKTP3S3OABM2BRPAHS2RFLYZSEFCLGCAQ47WSFMWWPGJQC
5NO7NCKTMM5ZW7JYOETUFOSWK2ACTXWDZGJAFXZN6L3OF6BFTNOQC
LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC
BA46C5LNEQ57N52IJTCEXW4J74F33KKNYHYXE6ZJLQ5ARMCJPUHAC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
UHANDRARA2OOOIKBFWPL5ICQH3ECDMWCPVKZXCXXR7E7PJN5SVYQC
IK53RV4VGOHLCZGQCCIKPB45M3C7M7YMNBOJFBGZJ4LWIZNU4QNQC
JLDUSNUOOQNL63BOPXIWZOWFRQ5X35RWG33PJB3J3KMR6QR7TN7QC
Y35C6GHH45ZUEZHHYZU4BQK3GOPJENOY2DZM3TMVUA6AMSPT2I7AC
NYC3LZKHWRIP2VJDCO3UVPR6TR7JURVX5NBS4H2AOOOG3ZG5G6FAC
IWVA2P2Y2RMX3F6AQNJ5JMK6VTAAC2YCQT25GYN5TTEXUWCBDY2QC
JFZNAYJXKCMXYHGCLTRH7Q6TOFGJ4BT6332GONCWVYRLNMDDG3KAC
SMM4HQTPAY45254O7GQOJVLHP5LZ6BXDKGNE7IKUJHB5XKH244ZAC
}
sub pkg : Chained('nix') PathPart Args(1) {
my ($self, $c, $pkgName) = @_;
my $pkg = $c->stash->{nixPkgs}->{$pkgName};
notFound($c, "Unknown Nix package `$pkgName'.")
unless defined $pkg;
$c->stash->{build} = $pkg;
$c->stash->{current_view} = 'Hydra::View::NixPkg';
$c->response->content_type('application/nix-package');
}
sub nixpkg :Local {
my ($self, $c, $buildId) = @_;
my $build = getBuild($c, $buildId);
notFound($c, "Build $buildId doesn't exist.") if !defined $build;
error($c, "Build $buildId cannot be downloaded as a Nix package.")
if !$build->buildproducts->find({type => "nix-build"});
error($c, "Path " . $build->outpath . " is no longer available.") unless isValidPath($build->outpath);
$c->stash->{current_view} = 'Hydra::View::NixPkg';
$c->stash->{build} = $build;
$c->response->content_type('application/nix-package');