Change the derivation schema attribute to derivationAttrPath#52
Change the derivation schema attribute to derivationAttrPath#52
derivation schema attribute to derivationAttrPath#52Conversation
`derivation` was fishy because it allows the schema to transform the derivation, or to construct an entirely new derivation. That might be useful sometimes, but flake schemas should describe what's in the output, not add entirely new stuff. Also remove `isDerivation` checks because Nix now automatically checks that the attribute corresponding to `derivationAttrPath` is a derivation.
📝 WalkthroughWalkthroughRefactors how derivation metadata is represented: inlined derivations are removed and replaced by attribute-path references ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Flake lock file updates:
• Updated input 'nix':
'github:DeterminateSystems/nix-src/8383f05' (2025-10-22)
→ 'github:DeterminateSystems/nix-src/4aadc97' (2026-02-27)
• Updated input 'nix/nixpkgs':
'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808723%2Brev-b1b3291469652d5a2edb0becc4ef0246fff97a7c/0198daf7-011a-7703-95d7-57146e794342/source.tar.gz' (2025-08-23)
→ 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz' (2025-10-27)
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/flake.nix (1)
84-85: Harden sorted diff command for deterministic shell behavior.Line 85 should quote both file paths and set a fixed locale for
sortto avoid locale-dependent ordering.Proposed patch
- wdiff <(sort < $src/tests/$flake.check-err) <(sort < "$flake.check-err") + wdiff <(LC_ALL=C sort < "$src/tests/$flake.check-err") <(LC_ALL=C sort < "$flake.check-err")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/flake.nix` around lines 84 - 85, Update the wdiff invocation so both file arguments are quoted and sorting uses a fixed locale: wrap the process substitution paths in quotes (e.g. <(sort < "$src/tests/$flake.check-err") and <(sort < "$flake.check-err")) and prefix the sort calls with LC_ALL=C (i.e. LC_ALL=C sort) to ensure deterministic, locale-independent ordering for the wdiff comparison.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests/flake.nix`:
- Around line 84-85: Update the wdiff invocation so both file arguments are
quoted and sorting uses a fixed locale: wrap the process substitution paths in
quotes (e.g. <(sort < "$src/tests/$flake.check-err") and <(sort <
"$flake.check-err")) and prefix the sort calls with LC_ALL=C (i.e. LC_ALL=C
sort) to ensure deterministic, locale-independent ordering for the wdiff
comparison.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
tests/flake.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
tests/checks.jsontests/flake.nixtests/legacyPackages.jsontests/nixos.jsontests/packages.jsontests/schemas.check-errtests/schemas.json
derivationwas fishy because it allows the schema to transform the derivation, or to construct an entirely new derivation. That might be useful sometimes, but flake schemas should describe what's in the output, not add entirely new stuff.Also remove
isDerivationchecks because Nix now automatically checks that the attribute corresponding toderivationAttrPathis a derivation.Summary by CodeRabbit