-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a working installer script for each commit/PR #4047
Comments
One possible approach would be to host nar-serve so that both the install script and the release tarball can be pulled directly from the cache. |
That or we setup Cachix and get it for free :) |
Given that the Hydra nix/master jobset already does this I'm not sure it makes sense to put a lot of effort into this. |
Good point. What is the endpoint that can be used on Hydra? |
I've tried that first, but the installer has wrong urls for tarballs and there's no way to get hydra build url as an input. |
It would be possible if there was a Hydra end-point that used the derivation hash as a parameter. Then it would be possible to generate a second install script automatically. |
Another option could be to extend the install script to accept additional argument/option that could provide custom download url (with a hash in the url, eg. file:///home/user/result/nix.tar.bz2#), then testing would be much easier and could even work for PRs. |
The installer script needs a custom url with any of the solutions. But you can't pass anything useful with hydra since you don't know the build url. Using Cachix we have all needed parameters Using GitHub releases you get the url as a step output. |
The problem with Hydra is that each derivation gets a new build ID so there is no unique prefix URL that can be used for all the architectures. Unless there is a different endpoint that I don't know about. |
Yes, there would need to be a new endpoint. That's why I suggested GitHub releases since I know that will be easier to settle on than to start using Cachix. |
I created https://github.com/numtide/nix-flakes-installer a while back because it's easier than to have an argument. So another route is to automate the process over there and basically poll for new releases. |
Maybe I'm missing some context here but why do we need github releases for unreleased Nix versions? |
That's an implementation detail. The goal is to allow to install arbitrary versions of Nix without having to wait for a release. |
Something like this (but with PR support--it would be OK if this was conditionally gated by a maintainer-applied tag or something) would have been a big help with the installer update I'm working on in #3996. There are 2 specific things I like here:
These are probably synergistic. An install/uninstall/reinstall test suite covering all ~official instructions and all of the weird install/uninstall problems people turn up in IRC/discourse/issues with is probably low leverage in isolation, but I imagine it becomes very high leverage once it starts catching breaks and validating fixes during PR review. As a bonus, the steps, conditions, and test cases it would collect with some bearing on reliably uninstalling Nix might simplify creating and testing an uninstall tool. Edit: I guess https://github.com/nixbuild/nix-quick-install-action/blob/master/flake.nix and https://github.com/numtide/nix-flakes-installer/blob/master/update.rb are both taking bites out of this for different reasons. |
The goal is to simplify the installation and testing of arbitrary Nix versions. 1. Extend the base installer to accept a NIX_RELEASE_URL to change where Nix is getting installed from. 2. Generate a new output from Hydra that combines all the released tarballs. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and get the "install" download link. 3. Select the allTarballs build and get the download link. Now equipped with all of this: curl -sfL https://hydra.nixos.org/build/1234/download/1/install | \ NIX_RELEASE_URL=https://hydra.nixos.org/build/5678/download/1/XXX sh Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--nar-serve <url>` to change where Nix is getting installed from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --nar-serve https://nar-serve.numtide.com Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--nar-serve <url>` to change where Nix is getting installed from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --nar-serve https://nar-serve.numtide.com Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--nar-serve <url>` to change where Nix is getting installed from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --nar-serve https://nar-serve.numtide.com Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--tarball-url <url>` to change where the Nix tarball is getting downloaded from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --tarball-url https://nar-serve.numtide.com/nix/store Or with cachix: curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \ | sh --tarball-url https://nar-serve.numtide.com/serve Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--tarball-url <url>` to change where the Nix tarball is getting downloaded from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --tarball-url https://nar-serve.numtide.com/nix/store Or with cachix: curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \ | sh --tarball-url https://mycache.cachix.org/serve Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--tarball-url <url>` to change where the Nix tarball is getting downloaded from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --tarball-url https://nar-serve.numtide.com/nix/store Or with cachix, strip the /nix/store and derivation name and then: curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \ | sh --tarball-url https://mycache.cachix.org/serve Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--tarball-url <url>` to change where the Nix tarball is getting downloaded from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --tarball-url https://nar-serve.numtide.com/nix/store Or with cachix, strip the /nix/store and derivation name and then: curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \ | sh --tarball-url https://mycache.cachix.org/serve Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--tarball-url <url>` to change where the Nix tarball is getting downloaded from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --tarball-url-prefix https://nar-serve.numtide.com/nix/store Or with cachix, strip the /nix/store and derivation name and then: curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \ | sh --tarball-url-prefix https://mycache.cachix.org/serve Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--tarball-url-prefix <url>` to change where the Nix tarball is getting downloaded from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --tarball-url-prefix https://nar-serve.numtide.com/nix/store Or with cachix, strip the /nix/store and derivation name and then: curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \ | sh --tarball-url-prefix https://mycache.cachix.org/serve Fixes NixOS#4047
The goal is to allow the installation and testing of arbitrary Nix versions. Extend the base installer to accept a `--tarball-url-prefix <url>` to change where the Nix tarball is getting downloaded from. Once this is merged it should allow to: 1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that looks healthy 2. Select the installedScript build and find the store path. Now equipped with all of this, use an instance of nar-serve to fetch the install script and release tarballs: curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \ | sh --tarball-url-prefix https://nar-serve.numtide.com/nix/store Or with cachix, strip the /nix/store and derivation name and then: curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \ | sh --tarball-url-prefix https://mycache.cachix.org/serve Fixes NixOS#4047
I've reopened this as we still need to write GA to get this really to a click of a button. |
GA == a GitHub Action, I guess? Is that already in progress? I have a big refactor of work on darwin encrypted volume almost ready--probably as a new PR. If so, I can hold up a bit to serve as a test case (having validation that I'm not breaking Linux installs would be nice...), but I'll steam ahead if it'll be a bit. |
Using https://github.com/actions/upload-release-asset we could create a
prerelease
release for each master commitand upload all artifacts needed for the installer script to work.
The downside is that this wouldn't work for PRs (not that big of a deal) and that release page would quickly get polluted while there's no way to filter out prereleases.
The text was updated successfully, but these errors were encountered: