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.24 upgrade #343655

Merged
merged 4 commits into from
Sep 22, 2024
Merged

Nix 2.24 upgrade #343655

merged 4 commits into from
Sep 22, 2024

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Sep 22, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

Copy link
Member

@fabianhjr fabianhjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release notes didn't get reverted and are still present on rl-2411

@fabianhjr
Copy link
Member

Mic92, just an idea (not a request / completely to your consideration),

Maybe target the current staging-next cycle to test before a broader rollout? (It isn't many rebuilds and could go directly to the main branch but due to the criticallity of nix for NixOS might be preferable to reduce the blast radius a bit)

@Mic92
Copy link
Member Author

Mic92 commented Sep 22, 2024

Mic92, just an idea (not a request / completely to your consideration),

Maybe target the current staging-next cycle to test before a broader rollout? (It isn't many rebuilds and could go directly to the main branch but due to the criticallity of nix for NixOS might be preferable to reduce the blast radius a bit)

Sounds good. Also we can than fix instead of revert.

@Mic92
Copy link
Member Author

Mic92 commented Sep 22, 2024

I found some issue with the nix-upgrade test. We need to patch switch-to-configuration to ignore /nix/store transient units.

@Mic92
Copy link
Member Author

Mic92 commented Sep 22, 2024

I found some issue with the nix-upgrade test. We need to patch switch-to-configuration to ignore /nix/store transient units.

Also I think this is issue would also happen with the current nix version as systemd creates a nix-store.mount unit that it than tries to unmount.

@Mic92
Copy link
Member Author

Mic92 commented Sep 22, 2024

So the nix-update tests revealed a regression in switch-to-configuration-ng, which needs to be fixed nevertheless as it will break any nix update: #343709

@Mic92
Copy link
Member Author

Mic92 commented Sep 22, 2024

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

1 package blacklisted:
  • nixos-install-tools
2 packages failed to build:
  • nix-plugin-pijul
  • nix-plugins
93 packages built:
  • appvm
  • attic-client
  • attic-server
  • bundix
  • cabal2nix
  • cached-nix-shell
  • common-updater-scripts
  • crate2nix
  • crystal2nix
  • disko
  • dub-to-nix
  • dydisnix
  • fusionInventory
  • libnixxml
  • lua51Packages.luarocks-nix
  • lua52Packages.luarocks-nix
  • lua53Packages.luarocks-nix
  • lua54Packages.luarocks-nix
  • luajitPackages.luarocks-nix
  • luarocks-packages-updater
  • nim_lk
  • niv (niv.bin ,niv.data)
  • nix
  • nix-binary-cache
  • nix-bundle
  • nix-direnv
  • nix-du
  • nix-index
  • nix-init
  • 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-required-mounts
  • nix-required-mounts.dist
  • nix-template
  • nix-update
  • nix-update-source
  • nix-update-source.dist
  • nix-update.dist
  • nix-visualize
  • nix-visualize.dist
  • nix.debug
  • nix.dev
  • nix.doc
  • nix.man
  • nixStatic
  • nixStatic.dev
  • nixStatic.doc
  • nixStatic.man
  • nixci
  • nixos-anywhere
  • nixos-generators
  • nixos-install
  • nixos-rebuild
  • nixos-shell
  • nixpkgs-hammering
  • nixpkgs-manual
  • nixpkgs-review
  • nixpkgs-review.dist
  • nixtract
  • node2nix
  • npins
  • nuget-to-nix
  • nurl
  • nvfetcher
  • outline
  • prefetch-yarn-deps
  • python311Packages.nix-kernel
  • python311Packages.nix-kernel.dist
  • python312Packages.nix-kernel
  • python312Packages.nix-kernel.dist
  • sbomnix
  • sbomnix.dist
  • sonarr
  • swiftPackages.swiftpm2nix
  • terranix
  • typescript-language-server
  • update-nix-fetchgit
  • update-python-libraries
  • vimPluginsUpdater
  • vulnix
  • vulnix.dist
  • vulnix.doc
  • vulnix.man
  • wp4nix
  • yarn2nix
  • zon2nix

@@ -31,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
boost
howard-hinnant-date
nix
nixVersions.nix_2_18
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't build with nix 2.24.

@Mic92 Mic92 changed the base branch from master to staging-next September 22, 2024 13:10
@Mic92
Copy link
Member Author

Mic92 commented Sep 22, 2024

@vcunat gave me green light to merge this to staging-next.

@Mic92 Mic92 merged commit 45aea99 into NixOS:staging-next Sep 22, 2024
14 of 16 checks passed
@Mic92 Mic92 deleted the nix-2.24-upgrade branch September 22, 2024 13:49
@trofi
Copy link
Contributor

trofi commented Oct 5, 2024

829636f broke the test eval in staging-next as:

$ nix build --no-link -f. nix-plugin-pijul.tests
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'localRepoCheck-nix-2.25.0pre20240920_ca3fc169'
         whose name attribute is located at pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'buildCommand' of derivation 'localRepoCheck-nix-2.25.0pre20240920_ca3fc169'
         at pkgs/build-support/trivial-builders/default.nix:59:17:
           58|         enableParallelBuilding = true;
           59|         inherit buildCommand name;
             |                 ^
           60|         passAsFile = [ "buildCommand" ]

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: function 'anonymous lambda' called with unexpected argument 'nix'
       at pkgs/by-name/ni/nix-plugin-pijul/package.nix:1:1:
            1| {
             | ^
            2|   lib,
       Did you mean lib?

@trofi
Copy link
Contributor

trofi commented Oct 5, 2024

Proposed a simple fix as:

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