Repository navigation
fix(nix): use stdenv.hostPlatform.isLinux instead of the deprecated alias - #397
Conversation
…lias Nixpkgs now throws a deprecation warning on every access of stdenv.isLinux / stdenv.isDarwin. nix develop printed five of them because the overlay, package, and dev shell all evaluated those aliases. Replace every remaining use with stdenv.hostPlatform.isLinux / stdenv.hostPlatform.isDarwin. Platform selection is unchanged. Verified: nix develop --command true no longer prints the stdenv.isLinux evaluation warnings.
There was a problem hiding this comment.
🟢 Approval recommended
The change is a mechanical, semantics-preserving alias replacement, and a repo-wide search confirms no deprecated stdenv.isLinux/stdenv.isDarwin uses remain.
Pull request overview
This PR replaces the deprecated Nixpkgs aliases stdenv.isLinux / stdenv.isDarwin with their canonical forms stdenv.hostPlatform.isLinux / stdenv.hostPlatform.isDarwin across the repository's Nix expressions. Recent Nixpkgs emits an evaluation deprecation warning on every access of the old aliases, which caused nix develop to print several warnings. The aliases are functionally identical to the hostPlatform accessors, so platform selection logic is unchanged.
Changes:
- Swap all remaining
stdenv.isLinux/stdenv.isDarwinuses forstdenv.hostPlatform.isLinux/stdenv.hostPlatform.isDarwin. - No semantic changes: the aliases resolve to the same
hostPlatformpredicates. - A repo-wide search confirms no deprecated aliases remain in any
.nixfile.
File summaries
| File | Description |
|---|---|
| nix/production-capabilities.nix | Uses hostPlatform predicates for the platform-selection branch. |
| nix/package.nix | Updates Darwin/Linux optionals and the Linux desktop-asset install step. |
| nix/modules/overlays.nix | Updates the WPE-WebKit Linux gating in the overlay. |
| nix/modules/dev-shells.nix | Updates the wpeWebkit Linux gate for the default dev shell. |
| nix/dev-shell.nix | Updates the local isLinux / isDarwin bindings. |
| nix/dependencies.nix | Updates Linux-only build-input optionals. |
| nix/checks/default.nix | Updates Linux assertions and check-phase conditionals. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Nixpkgs now throws a deprecation warning on every access of
stdenv.isLinux/stdenv.isDarwin.nix developprinted five of them because the overlay, package, and dev shell all evaluated those aliases:Replace every remaining use with
stdenv.hostPlatform.isLinux/stdenv.hostPlatform.isDarwin. Platform selection is unchanged.Files:
nix/modules/overlays.nixnix/modules/dev-shells.nixnix/dev-shell.nixnix/dependencies.nixnix/package.nixnix/production-capabilities.nixnix/checks/default.nixVerification:
nix develop --command trueno longer prints thestdenv.isLinuxevaluation warnings.