Conversation
Since 2.32, nix now needs boost 1.87 or later to build,
due to using unordered::concurrent_flat_map try_emplace_and_cvisit
../src/libexpr/eval.cc: In member function ‘void nix::EvalState::evalFile(const nix::SourcePath&, nix::Value&, bool)’:
../src/libexpr/eval.cc:1096:20: error: ‘class boost::unordered::concurrent_flat_map<nix::SourcePath, nix::Value*, std::hash<nix::SourcePath>, std::equal_to<nix::SourcePath>, traceable_allocator<std::pair<const nix::SourcePath, nix::Value*> > >’ has no member named ‘try_emplace_and_cvisit’; did you mean ‘try_emplace_or_cvisit’?
1096 | fileEvalCache->try_emplace_and_cvisit(
| ^~~~~~~~~~~~~~~~~~~~~~
| try_emplace_or_cvisit
See boostorg/unordered@834580b
(cherry picked from commit f594a8e)
Instead of iterating over the newly built bindings we can do a cheaper set_intersection to count duplicates or fall back to a per-element binary search over the "base" bindings. This speeds up `hello` evaluation by around 10ms (0.196s -> 0.187s) and `nixos.closures.ec2.x86_64-linux` by 140ms (2.744s -> 2.609s). This addresses a somewhat steep performance regression from 82315c3 that reduced memory requirements of attribute set merges. With this patch we get back around to 2.31 level of eval performance while keeping the memory usage optimization. Also document the optimization a bit more. (cherry picked from commit ec2fd2d)
…tenance [Backport 2.32-maintenance] nix-2.32 needs boost-1.87+ for `try_emplace_and_cvisit`
…tenance [Backport 2.32-maintenance] libexpr: Speed up BindingsBuilder::finishSizeIfNecessary
(cherry picked from commit 9d4d109)
The `showBytes()` function was redundant with `renderSize()` as the latter automatically selects the appropriate unit (KiB, MiB, GiB, etc.) based on the value, whereas `showBytes()` always formatted as MiB regardless of size. Co-authored-by: Bernardo Meurer Costa <beme@anthropic.com> (cherry picked from commit f234633)
(cherry picked from commit 584a8e8)
…tenance [Backport 2.32-maintenance] diff-closures: print sizes with dynamic unit
This will currently fail, until the bug is fixed. Co-Authored-By: Sergei Zimmerman <sergei@zimmerman.foo> (cherry picked from commit 246dbe1)
The test added in the previous commit now passes. Co-authored-by: Eelco Dolstra <edolstra@gmail.com> (cherry picked from commit de19279)
…tenance [Backport 2.32-maintenance] Fix issue NixOS#14287
Some zsh setups (including mine) do not load the completion if `#compdef` is not on the first line. So we move the `# shellcheck` comment to the second line to avoid this issue. (cherry picked from commit 956fffd)
…tenance [Backport 2.32-maintenance] zsh/completion: put compdef on first line
…outputs Fixes: NixOS#14130 (cherry picked from commit 9eecee3)
…tenance [Backport 2.32-maintenance] fix(libstore/build/derivation-goal): don't assert on partially valid outputs
(cherry picked from commit 1ca6e9e)
…tenance [Backport 2.32-maintenance] meson: Also split version string at '+' for Darwin
…tenance [Backport 2.32-maintenance] libfetchers: Restore plain git inputs recognition
This restores the pre-2.31 handling of ZoneID identifiers in store references. It's the only place we reasonably care about this back-compat. (cherry picked from commit 8dbc247)
…tenance [Backport 2.32-maintenance] libstore: Improve store-reference back-compat with IPv6 ZoneId literals
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/d98ce345cdab58477ca61855540999c86577d19d?narHash=sha256-O2CIn7HjZwEGqBrwu9EU76zlmA5dbmna7jL1XUmAId8%3D' (2025-08-26)
→ 'github:NixOS/nixpkgs/daf6dc47aa4b44791372d6139ab7b25269184d55?narHash=sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8%2BON/0Yy8%2Ba5vsDU%3D' (2025-10-27)
(cherry picked from commit 233bd25)
(cherry picked from commit 81a2809)
…tenance [Backport 2.32-maintenance] flake: Update, nixos-25.05-small -> nixos-25.05
The assumption that no unknown paths can be returned is incorrect. It can happen if a derivation has outputs that are substitutable, but that have references that cannot be substituted (i.e. an incomplete closure in the binary cache). This can easily happen with magic-nix-cache. (cherry picked from commit a828cf7)
…tenance [Backport 2.32-maintenance] nix flake check: Remove incorrect assertion
Fixes NixOS#14311. (cherry picked from commit c131701)
…tenance [Backport 2.32-maintenance] Don't crash on flakerefs containing newlines
Tagging release 2.32.3
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThis patch updates Nix to version 2.32.3, improving IPv6 store reference parsing with zone ID support, refining post-build hook invocation in check mode, adjusting build output handling, and bumping the Boost dependency requirement to 1.87.0. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Build as DerivationBuildingGoal
participant Check as checkPathValidity()
participant Hook as Post-Build Hook
User->>Build: tryToBuild() in bmCheck mode
alt Old: bmCheck uses builtOutputs
Build->>Hook: outputs from DerivationBuilder
Note over Hook: Hook may be skipped if<br/>no new registrations
else New: bmCheck uses revalidated outputs
Build->>Check: checkPathValidity(initialOutputs)
Check-->>Build: (knownOutputs, unknownOutputs)
Build->>Build: Use unknownOutputs as source
Build->>Hook: Known + validated outputs
Note over Hook: Hook always invoked<br/>with revalidated set
end
Hook-->>User: Hook results in HOOK_DEST
sequenceDiagram
participant Parser as StoreReference Parser
participant IPv6 as IPv6 Detection
participant Zone as Zone ID Handler
Parser->>Parser: Receive unbracketed IPv6 authority
Parser->>Parser: Strip brackets if present
Parser->>Parser: Split at '%' delimiter
alt Zone ID present
Parser->>Zone: Extract zone indicator
Parser->>IPv6: Parse IPv6 from pre-% substring
IPv6-->>Zone: Parsed address
Zone->>Zone: Percent-encode '%' as %25
Zone-->>Parser: Rebuild: [IPv6%25zoneId]
else No Zone ID
Parser->>IPv6: Parse full authority as IPv6
IPv6-->>Parser: Parsed address
end
Parser-->>Parser: Return normalized store reference
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
Flake lock file updates:
• Updated input 'nixpkgs':
'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808723%2Brev-b1b3291469652d5a2edb0becc4ef0246fff97a7c/0198daf7-011a-7703-95d7-57146e794342/source.tar.gz?narHash=sha256-wY1%2B2JPH0ZZC4BQefoZw/k%2B3%2BDowFyfOxv17CN/idKs%3D' (2025-08-23)
→ 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz?narHash=sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=' (2025-11-04)
Motivation
Also updates the nixpkgs lock.
Context
Summary by CodeRabbit
New Features
Bug Fixes
--check) now consistently runs post-build hooks.Chores