In Hydra channels, show only packages matching the user's system type
[?]
Oct 7, 2013, 12:53 PM
L5Z6CN7MHFGRL2QPLCVQJSDECT35EW52INUV5RVI4CXH2YSDJGNACDependencies
- [2]
GTGPPGJCPrevent an unnecessary SQL query for every package in the NixExprs view - [3]
PMNWRTGJAdd multiple output support - [4]
5YKSN2MJ* Doh. - [5]
32LK6HFV* Escape the outPath in the generated nixexpr.tar.bz2 in channels, because - [6]
LVJKRTIK* Generate a Nix expression for the channel. - [7]
PUXLEJTZ* Set mtime to 0 to ensure that the generate tar file doesn't change - [8]
I42G2Z7P* Escape string literals.[ - [9]
PCK2Q2VO - [10]
UZENK33P* Generate a .tar.bz2 file for the channel Nix expression, since
Change contents
- replacement in src/lib/Hydra/View/NixExprs.pm at line 22
my $res = "[\n";my %perSystem; - replacement in src/lib/Hydra/View/NixExprs.pm at line 26[3.10956]→[3.10956:10994](∅→∅),[3.10994]→[4.679:727](∅→∅),[4.679]→[4.679:727](∅→∅),[4.727]→[2.0:103](∅→∅),[2.103]→[4.235:302](∅→∅),[4.235]→[4.235:302](∅→∅),[4.302]→[3.10995:11064](∅→∅),[4.69]→[4.970:1004](∅→∅),[3.11064]→[4.970:1004](∅→∅),[4.970]→[4.970:1004](∅→∅),[4.1004]→[4.303:381](∅→∅)
$res .= " # $pkg->{name}\n";$res .= " { type = \"derivation\";\n";$res .= " name = " . escape ($build->get_column("releasename") or $build->nixname) . ";\n";$res .= " system = " . (escape $build->system) . ";\n";$res .= " outPath = " . (escape $pkg->{outPath}) . ";\n";$res .= " meta = {\n";$res .= " description = " . (escape $build->description) . ";\n"my $s = "";$s .= " # $pkg->{name}\n";$s .= " ${\escape $build->get_column('job')} = {\n";$s .= " type = \"derivation\";\n";$s .= " name = ${\escape ($build->get_column('releasename') or $build->nixname)};\n";$s .= " system = ${\escape $build->system};\n";$s .= " outPath = ${\escape $pkg->{outPath}};\n";$s .= " meta = {\n";$s .= " description = ${\escape $build->description};\n" - replacement in src/lib/Hydra/View/NixExprs.pm at line 36
$res .= " longDescription = " . (escape $build->longdescription) . ";\n"$s .= " longDescription = ${\escape $build->longdescription};\n" - replacement in src/lib/Hydra/View/NixExprs.pm at line 38
$res .= " license = " . (escape $build->license) . ";\n"$s .= " license = ${\escape $build->license};\n" - replacement in src/lib/Hydra/View/NixExprs.pm at line 40
$res .= " };\n";$res .= " }\n";$s .= " maintainers = ${\escape $build->maintainers};\n"if $build->maintainers;$s .= " };\n";$s .= " };\n\n";$perSystem{$build->system} .= $s;}my $res = "{ system ? builtins.currentSystem }:\n\n";my $first = 1;foreach my $system (keys %perSystem) {$res .= "else " if !$first;$res .= "if system == ${\escape $system} then {\n\n";$res .= $perSystem{$system};$res .= "}\n\n";$first = 0; - replacement in src/lib/Hydra/View/NixExprs.pm at line 58
$res .= "]\n";$res .= "else " if !$first;$res .= "{}\n"; - replacement in src/lib/Hydra/View/NixExprs.pm at line 62
$tar->add_data("channel/channel-name", ($c->stash->{channelName} or "unnamed-channel"), {mtime => 0});$tar->add_data("channel/default.nix", $res, {mtime => 0});$tar->add_data("channel/channel-name", ($c->stash->{channelName} or "unnamed-channel"), {mtime => 1});$tar->add_data("channel/default.nix", $res, {mtime => 1});