Skip to content

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

Open
infinisil wants to merge 1 commit intoNixOS:masterfrom
tweag:nix-fallback-paths-script
Open

nix-fallback-paths.nix: Create an update script#235463
infinisil wants to merge 1 commit intoNixOS:masterfrom
tweag:nix-fallback-paths-script

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

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jun 1, 2023
@infinisil infinisil mentioned this pull request Jun 1, 2023
12 tasks
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 1, 2023
@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

@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 This PR has merge conflicts with the target branch 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

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants