Skip to content

fix(nix): rename pkgs.system -> pkgs.stdenv.hostPlatform.system#130

Merged
water-sucks merged 1 commit intonix-community:mainfrom
water-sucks:update-deprecated-pkgs-system-attribute
Nov 9, 2025
Merged

fix(nix): rename pkgs.system -> pkgs.stdenv.hostPlatform.system#130
water-sucks merged 1 commit intonix-community:mainfrom
water-sucks:update-deprecated-pkgs-system-attribute

Conversation

@water-sucks
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks commented Nov 9, 2025

Description

This was a recent change in upstream nixpkgs, to deprecate the shorthand for pkgs.stdenv.hostPlatform.system. This PR updates any usage of the old attribute to the new one.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed inconsistent system platform detection across build configurations, ensuring accurate package resolution for your system architecture.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 9, 2025

Walkthrough

Three Nix configuration files are refactored to replace pkgs.system with a local system variable derived from pkgs.stdenv.hostPlatform. The system variable is bound in each file and consistently applied to package resolution paths.

Changes

Cohort / File(s) Summary
System variable refactoring
default.nix, flake.nix, module.nix
Introduce local system binding from pkgs.stdenv.hostPlatform and replace all pkgs.system references with system in package attribute paths

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that the system binding is correctly derived from pkgs.stdenv.hostPlatform in each file
  • Confirm all pkgs.system references are consistently replaced with system across the three files
  • Check that package resolution paths remain functionally equivalent after the refactoring

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing pkgs.system with pkgs.stdenv.hostPlatform.system across multiple Nix files as part of a deprecation fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c499246 and b78e455.

📒 Files selected for processing (3)
  • default.nix (1 hunks)
  • flake.nix (1 hunks)
  • module.nix (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build/Test
🔇 Additional comments (4)
default.nix (1)

3-5: LGTM! Correctly migrates from deprecated pkgs.system.

The changes properly bind system from pkgs.stdenv.hostPlatform and consistently apply it to package path resolution, aligning with nixpkgs upstream deprecation.

module.nix (1)

14-14: LGTM! Consistent system binding and usage.

The system binding from pkgs.stdenv.hostPlatform is correctly applied to both conditional branches of the default package selection, properly replacing the deprecated attribute.

Also applies to: 27-28

flake.nix (2)

28-28: LGTM! Idiomatic flake usage of system parameter.

In the flake context, using the system parameter from eachSystem (line 24) instead of extracting from pkgs is the correct and idiomatic approach. Since pkgs is built for that specific system (line 25), the semantics remain equivalent.

Also applies to: 33-33


28-28: All pkgs.system usages have been successfully replaced.

Verification confirms no remaining references to the deprecated pkgs.system attribute exist across the codebase. Lines 28 and 33 correctly use the ${system} variable instead. The deprecation fix is complete.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@water-sucks water-sucks merged commit 2d2b545 into nix-community:main Nov 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant