Remove nix-install-package support

[?]
Jan 15, 2018, 1:27 PM
ST4TUC3E5XU5SPRYPKWXCKHPCKHU4YXX7ZEZDI7PWN3WIKVEAVFQC

Dependencies

  • [2] OIS2UPQG
  • [3] 2DGQI6U4 channel-contents: Fix display of last paragraph.
  • [4] 5G5PZ3TX Fix 'Can't locate object method "buildstepoutputs"'
  • [5] NLYDMDAX .nixpkgs: Drop obsolete manifest URI
  • [6] RHMUFX4R product list: convert to a proper table
  • [7] YVH5SVLS Make one-click installs work for binary cache stores
  • [8] LVJKRTIK * Generate a Nix expression for the channel.
  • [9] 5Y3XOQBR Include the URL of the binary cache in .nixpkg files
  • [10] CQTN62OH Die tabs die
  • [11] 3ZAJ2ZRP Use popovers for the product list help/details
  • [12] UXVDOUBJ
  • [13] ZRBXLKFO
  • [14] QE253KG4 * Option to show the tail of a log.
  • [15] 6GEU36HW Remove obsolete CSS classes
  • [16] MNKXBLNC Return 410 Gone (rather than 500) if an output is no longer available
  • [17] PKPWUHUX * Idem.
  • [18] D5QIOJGP * Move everything up one directory.
  • [19] GPRYAAFP hydra: change icon for positive failures
  • [20] YS3AVMLC Remove buildtime and runtime dependency graph. It is useless on normal derivations.
  • [21] GIUGQKVR Fix .nixpkg channel uri
  • [22] NYC3LZKH * Generate NAR archives on the fly. Necessary for producing channels
  • [23] HSVVEKTY * Start of a JSON API to get information about a specific build.
  • [24] MVB7RRLT * Move NARs from the NixChannel controller to the Root controller and
  • [25] IWVA2P2Y * Generate manifests on demand. Next step: generate NAR archives on
  • [26] HXBXDEFK Speed up channel processing
  • [27] OEPUOUNB Using twitter bootstrap for more consistent looks for Hydra
  • [28] JRU2LRPZ
  • [29] 5NO7NCKT * Refactoring.
  • [30] KI423DCQ Stream logs if possible and remove size limit
  • [31] CPSEZOSX Remove remaining references to store_mode etc.
  • [32] PMNWRTGJ Add multiple output support
  • [33] XHVZXX6N
  • [34] UZENK33P * Generate a .tar.bz2 file for the channel Nix expression, since
  • [35] BHZXGT2H * Channels: provide an index page that lists all the packages in the
  • [36] NDL67SQT * XHTML validity.
  • [37] BIVZGPUT Optimise clickable rows
  • [38] UFR64PJ7 Hide contents links
  • [39] IDT3SO3P Generate *.narinfo files on the fly to support the binary cache substituter
  • [40] 3PNG7NIB Remove trailing whitespace
  • [41] OD5FSS5A * Quick hack to allow viewing of dependency graphs (via nix-store -q
  • [42] PZL3SZM3 Give every page a consistent title
  • [43] GS4SFHCP templates: Use uri_for to reference static paths.
  • [44] ON4DDIBZ * Forgot to commit.
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] JFZNAYJX * Showing releases.

Change contents

  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 79
    [8.156][8.156:157]()
  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 80
    [8.4][8.4:83]()
    sub pkg : Chained('nix') PathPart Args(1) {
    my ($self, $c, $pkgName) = @_;
  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 81
    [8.84][8.1532:1639](),[8.1639][8.1272:1429](),[8.1429][8.1639:1786](),[8.1639][8.1639:1786](),[8.86][8.132:133](),[8.1786][8.132:133](),[8.132][8.132:133](),[8.133][8.0:77](),[8.77][7.30:129](),[8.95][8.246:247](),[7.129][8.246:247](),[8.246][8.246:247](),[8.247][8.178:220](),[8.220][8.302:362](),[8.302][8.302:362](),[8.362][8.0:4]()
    if (!$c->stash->{build}) {
    $pkgName =~ /-(\d+)\.nixpkg$/ or notFound($c, "Bad package name.");
    # FIXME: need to handle multiple outputs: channelBuilds is
    # joined with the build outputs, so find() can return multiple
    # results.
    $c->stash->{build} = $c->stash->{channelBuilds}->find({ id => $1 })
    || notFound($c, "No such package in this channel.");
    }
    gone($c, "Build " . $c->stash->{build}->id . " is no longer available.")
    if isLocalStore() && any { !isValidPath($_->path) } $c->stash->{build}->buildoutputs->all;
    $c->stash->{current_view} = 'NixPkg';
    $c->response->content_type('application/nix-package');
    }
  • edit in src/lib/Hydra/Controller/Build.pm at line 124
    [4.270]
    [46.1111]
    $c->stash->{binaryCachePublicUri} = $c->config->{binary_cache_public_uri};
  • file deletion: NixPkg.pm (----------)NixPkg.pm (----------)
    [8.646][8.439:472](),[8.472][8.1:1](),[8.1193][8.1391:1424](),[8.1424][8.1:1]()
    package Hydra::View::NixPkg;
    use strict;
    use base qw/Catalyst::View/;
    use Hydra::Helper::CatalystUtils;
    sub process {
    my ($self, $c) = @_;
    $c->response->content_type('application/nix-package');
    my $build = $c->stash->{build};
    my $channelUri = $c->config->{binary_cache_public_uri} // $c->uri_for('/');
    # FIXME: add multiple output support
    my $s = "NIXPKG1 http://invalid.org/"
    . " " . $build->nixname . " " . $build->system
    . " " . $build->drvpath . " " . $build->buildoutputs->find({name => "out"})->path
    . " " . $channelUri;
    $c->response->body($s);
    return 1;
    }
    1;
  • edit in src/root/channel-contents.tt at line 26
    [3.25][8.785:786](),[8.785][8.785:786](),[8.786][2.0:45](),[2.45][8.830:1014](),[8.830][8.830:1014]()
    <p>Alternatively, if you have associated the
    <tt>application/nix-package</tt> MIME type with the
    <tt>nix-install-package</tt> program in your web browser, you can
    install the package simply by clicking on the packages below.</p>
  • edit in src/root/channel-contents.tt at line 47
    [8.604][8.3923:3976](),[8.3923][8.3923:3976]()
    [% uri = "${curUri}/pkg/${pkg.name}.nixpkg" %]
  • replacement in src/root/channel-contents.tt at line 50
    [8.678][8.273:387]()
    <td><a class="row-link" href="[% uri %]"><tt>[% b.get_column('releasename') || b.nixname %]</tt></a></td>
    [8.678]
    [8.775]
    <td><tt>[% b.get_column('releasename') || b.nixname %]</tt></td>
  • replacement in src/root/product-list.tt at line 74
    [6.928][6.928:960]()
    One-Click install
    [6.928]
    [6.960]
    Nix package
  • replacement in src/root/product-list.tt at line 77
    [6.995][6.995:1203]()
    [% uri = c.uri_for('/build' build.id 'nix' 'pkg' "${build.nixname}-${build.system}.nixpkg") %]
    <a href="[% uri %]">
    <tt>[% build.nixname %]</tt>
    </a>
    [6.995]
    [6.1203]
    <tt>[% HTML.escape(build.nixname) %]</tt>
  • replacement in src/root/product-list.tt at line 80
    [6.1238][6.1238:1783](),[6.1783][8.31272:31273](),[8.1332][8.31272:31273](),[8.31273][6.1784:1901]()
    [% WRAPPER makePopover title="Help" classes="btn-mini" %]
    <p>If you have Nix installed on your machine, you can
    install this package and all its dependencies automatically
    by clicking on the link above. This requires that you have
    the <tt>application/nix-package</tt> MIME type associated
    with the <tt>nix-install-package</tt> program in your web
    browser. Alternatively, you can install it from the
    command-line:</p>
    <pre><span class="shell-prompt">$ </span>nix-install-package --non-interactive --url [% uri %]</pre>
    [6.1238]
    [8.31274]
    [% WRAPPER makePopover title="Help" classes="btn-mini"
    %] <p>Yu can install this package using the Nix package
    manager from the command-line:</p>
  • replacement in src/root/product-list.tt at line 84
    [8.31275][6.1902:2128]()
    <p>If you get an error message “Permission denied”, you
    should make sure that you have sufficient access rights to
    the Nix store, e.g., run the command as <tt>root</tt>.</p>
    [8.31275]
    [6.2128]
    <pre><span class="shell-prompt">$ </span>nix-env -i [%HTML.escape(product.path)%][% IF binaryCachePublicUri %] --option binary-caches [% HTML.escape(binaryCachePublicUri) %][% END %]</pre>