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: 2.3.16 -> 2.4 #144197

Merged
merged 15 commits into from
Nov 9, 2021
Merged

nix: 2.3.16 -> 2.4 #144197

merged 15 commits into from
Nov 9, 2021

Conversation

lovesegfault
Copy link
Member

Motivation for this change

https://discourse.nixos.org/t/nix-2-4-released/15822

I'm keeping the previous release around in the nix_2_3 package. This moves
nix and nixStable to point to nix_2_4 now.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@Synthetica9
Copy link
Member

So that's why I couldn't find the commit that bumped Nix to 2.4

@cdepillabout
Copy link
Member

cc @domenkozar and @roberth for the cachix and hercules-ci changes.

@roberth
Copy link
Member

roberth commented Nov 2, 2021

@cdepillabout Thanks for the ping! The Nix binding packages, haskellPackages.hercules-ci-cnix-*, that are used by Cachix and Hercules CI are prepared for Nix 2.4 compatibility, so they can be switched very very soon, but considering that you've already pinned it to Nix 2.3, it seems best to speed up the Nix update itself and to have a transitional revision of Nixpkgs.
I can take care of that part of the upgrade in a follow-up PR.

@lovesegfault
Copy link
Member Author

Result of nixpkgs-review pr 144197 run on x86_64-linux 1

1 package failed to build:
  • nixos-install-tools
46 packages built:
  • bundix
  • cabal2nix
  • common-updater-scripts
  • crate2nix
  • crystal2nix
  • dep2nix
  • dydisnix
  • fusionInventory
  • go2nix
  • hubstaff
  • libnixxml
  • lispPackages.quicklisp-to-nix
  • lispPackages.quicklisp-to-nix-system-info
  • nix (nixFlakes ,nixStable ,nix_2_4)
  • nix-binary-cache
  • nix-bundle
  • nix-direnv
  • nix-du
  • nix-index
  • nix-pin
  • nix-prefetch
  • nix-prefetch-bzr
  • nix-prefetch-cvs
  • nix-prefetch-docker
  • nix-prefetch-git
  • nix-prefetch-hg
  • nix-prefetch-scripts
  • nix-prefetch-svn
  • nix-serve
  • nix-simple-deploy
  • nix-template
  • nix-update
  • nix-update-source
  • nix_2_3
  • nixos-generators
  • nixos-rebuild
  • nixos-shell
  • nixui
  • nvfetcher
  • prefetch-yarn-deps
  • python38Packages.nix-kernel
  • python39Packages.nix-kernel
  • update-nix-fetchgit
  • vgo2nix
  • vulnix
  • yarn2nix

@lovesegfault
Copy link
Member Author

I think the nixos-install-tools failure is a false-positive, I can build it fine outside of nixpkgs-review

@lovesegfault
Copy link
Member Author

Also, pkgsStatic.nix_2_4 is broken.

@roberth
Copy link
Member

roberth commented Nov 2, 2021

nixos-install-tools false-positive

Mic92/nixpkgs-review#200

@lovesegfault
Copy link
Member Author

Result of nixpkgs-review pr 144197 run on aarch64-linux 1

1 package failed to build:
  • nixos-install-tools
41 packages built:
  • bundix
  • cabal2nix
  • common-updater-scripts
  • crate2nix
  • dep2nix
  • dydisnix
  • fusionInventory
  • go2nix
  • libnixxml
  • lispPackages.quicklisp-to-nix
  • lispPackages.quicklisp-to-nix-system-info
  • nix (nixFlakes ,nixStable ,nix_2_4)
  • nix-binary-cache
  • nix-bundle
  • nix-direnv
  • nix-du
  • nix-index
  • nix-pin
  • nix-prefetch
  • nix-prefetch-bzr
  • nix-prefetch-cvs
  • nix-prefetch-docker
  • nix-prefetch-git
  • nix-prefetch-hg
  • nix-prefetch-scripts
  • nix-prefetch-svn
  • nix-serve
  • nix-simple-deploy
  • nix-template
  • nix-update
  • nix-update-source
  • nix_2_3
  • nixos-generators
  • nixos-rebuild
  • nixos-shell
  • nvfetcher
  • prefetch-yarn-deps
  • update-nix-fetchgit
  • vgo2nix
  • vulnix
  • yarn2nix

@lovesegfault
Copy link
Member Author

Help will be needed to test this on x86_64-darwin and aarch64-darwin since I do not have access to hosts with those arches.

@lovesegfault
Copy link
Member Author

@GrahamcOfBorg eval

@andersk
Copy link
Contributor

andersk commented Nov 2, 2021

See also

@Kranzes
Copy link
Member

Kranzes commented Nov 2, 2021

Are we keeping nixFlakes just for backwards compatibility now? Since the default Nix package will now already support flakes.

With nix 2.4 the fact that we set NIX_STATE_DIR, but kept the original
store became a hard error. We work around it here by forcing the use of
a fresh, sandbox-local, store.

See regnat's wonderful analysis for more information:
NixOS/nix#5495 (comment)
@lovesegfault
Copy link
Member Author

lovesegfault commented Nov 9, 2021

Thanks to @regnat the last remaining eval failure has been worked around. For an analysis of the cause and solution see their comment: NixOS/nix#5495 (comment)

@domenkozar domenkozar merged commit a658747 into master Nov 9, 2021
@lovesegfault lovesegfault deleted the nix-2.4 branch November 9, 2021 19:23
@roberth
Copy link
Member

roberth commented Nov 9, 2021

I've created an upstream PR to record the breaking change NixOS/nix#5529
Merge seems in order. 👍 🎉

lovesegfault added a commit to lovesegfault/nixpkgs that referenced this pull request Nov 9, 2021
Follow-up to NixOS#144197 since nixUnstable is no longer needed for flake
support.
@lovesegfault lovesegfault mentioned this pull request Nov 9, 2021
12 tasks
lovesegfault added a commit to lovesegfault/nixpkgs that referenced this pull request Nov 9, 2021
Follow-up to NixOS#144197 since nixUnstable is no longer for many new
features.
@lovesegfault lovesegfault mentioned this pull request Nov 9, 2021
12 tasks
@lovesegfault
Copy link
Member Author

Thanks for everyone who helped test and debug this in the past week, I most definitely could not have gotten this in a mergeable state without all of you pitching in :)

lovesegfault added a commit to lovesegfault/home-manager that referenced this pull request Nov 9, 2021
Since NixOS/nixpkgs#144197 flake support is
always available. The upstream `enableFlakes` option is scheduled to be
removed altogether in NixOS/nixpkgs#145236
lovesegfault added a commit to lovesegfault/nixpkgs that referenced this pull request Nov 10, 2021
Follow-up to NixOS#144197 since nixUnstable is no longer needed for flake
support.
berbiche pushed a commit to nix-community/home-manager that referenced this pull request Nov 10, 2021
Since NixOS/nixpkgs#144197 flake support is
always available. The upstream `enableFlakes` option is scheduled to be
removed altogether in NixOS/nixpkgs#145236
@roberth
Copy link
Member

roberth commented Nov 10, 2021

For the fix, Eelco suggests --store instead. Did you try that?

@thufschmitt
Copy link
Member

For the fix, Eelco suggests --store instead. Did you try that?

I didn’t try it, but I think this isn’t gonna work, because --store foo will bind-mount foo on top of /nix (so hide $src). --store local?store=$PWD/.store should work, but it’s essentially the same as setting NIX_STORE_DIR

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-21/16032/1

peterhoeg pushed a commit to peterhoeg/home-manager that referenced this pull request Nov 29, 2021
Since NixOS/nixpkgs#144197 flake support is
always available. The upstream `enableFlakes` option is scheduled to be
removed altogether in NixOS/nixpkgs#145236
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.

None yet