Skip to content
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

nix-fallback-paths.nix: Create an update script #235463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

infinisil
Copy link
Member

Description of changes

This is an update script for the nix-fallback-paths.nix file, which I would've liked for #233439. While effectively the same also exists in the Nix release script, that script can only be run by @edolstra and also shouldn't be in the Nix source in the first place, since it updates something for Nixpkgs.

One thing I am not sure about is how the Hydra evaluation ID to get the Nix store paths from should be determined. It should match the Hydra evaluation used for the Nix release pushed to http://releases.nixos.org/?prefix=nix, but the Hydra evaluation ID is not exposed from there.

Alternatively, we could get the Nix store paths directly from http://releases.nixos.org/?prefix=nix without going through the Hydra evaluation ID, but the binary blobs seem to be detached from their original store paths, so that's also not doable.

Ping @NixOS/nix-team

This work is sponsored by Antithesis

Things done
  • Run the script, testing it manually, updating the nix-fallback-paths.nix file
  • Document the code and how to run it
  • Add a CI check to ensure that the fallback paths are always for the same version as the current nix attribute

@thufschmitt
Copy link
Member

Alternatively, we could get the Nix store paths directly from http://releases.nixos.org/?prefix=nix without going through the Hydra evaluation ID, but the binary blobs seem to be detached from their original store paths, so that's also not doable.

I'm wondering whether these fallback paths could just get a statically linked Nix from releases.nixos.org and import it as a CA path. That would avoid having to pull in stuff from hydra (releases.nixos.org doesn't have the static builds yet, but it wouldn't be hard to add them, and it would probably be good any way)

@edolstra
Copy link
Member

edolstra commented Jun 5, 2023

IMHO it's a bit silly to have an update script for something that already gets output by the release script. Maybe it would help if the release script uploads the new fallback paths to the S3 bucket?

@infinisil
Copy link
Member Author

@edolstra It should be the Hydra evaluation ID used for the release instead

edolstra added a commit to edolstra/nix that referenced this pull request Jun 6, 2023
@edolstra
Copy link
Member

edolstra commented Jun 6, 2023

The release script now uploads fallback-paths.nix, see e.g. https://releases.nixos.org/nix/nix-2.16.1/fallback-paths.nix.

@infinisil
Copy link
Member Author

@edolstra Why not the hydra evaluation ID? It doesn't make sense for the Nix release script to generate a Nixpkgs-specific file..

@edolstra
Copy link
Member

edolstra commented Jun 6, 2023

Because it's much more convenient to do it this way.

@infinisil
Copy link
Member Author

@edolstra I do not agree about that. I opened NixOS/nix#8464 with my suggested solution instead, please take a look.

@infinisil infinisil mentioned this pull request Nov 9, 2023
13 tasks
@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants