treewide: deprecate toplevel {build,host,target}Platform#209816
Merged
Artturin merged 2 commits intoNixOS:masterfrom Jan 9, 2023
Merged
treewide: deprecate toplevel {build,host,target}Platform#209816Artturin merged 2 commits intoNixOS:masterfrom
Artturin merged 2 commits intoNixOS:masterfrom
Conversation
97f4343 to
f489615
Compare
f489615 to
ecab3ed
Compare
1e0941f to
96f7a94
Compare
3 tasks
l0b0
approved these changes
Jan 9, 2023
Contributor
|
2 seemingly minor changes in packages. Should be OK: |
trofi
approved these changes
Jan 9, 2023
SuperSandro2000
approved these changes
Jan 9, 2023
Contributor
|
The |
maralorn
reviewed
Jan 9, 2023
Member
|
Thanks for doing this, @Artturin! |
96f7a94 to
2eeb34c
Compare
Member
Author
thats because nixos-install-tools depends on the nixpkgs revision |
Contributor
TIL! Thank you! |
trofi
approved these changes
Jan 9, 2023
Member
Author
|
The attrs in splice.nix weren't removed #350299 |
Rhys-T
added a commit
to Rhys-T/nur-packages
that referenced
this pull request
Jul 16, 2025
Didn't realize they were deprecated (NixOS/nixpkgs#209816). Caused `drl` and `lix-game` to fail when `config.allowAliases = false`. Fixes #140.
4 tasks
caarlos0
pushed a commit
to goreleaser/goreleaser
that referenced
this pull request
Dec 23, 2025
…stem parameter (#6316) <!-- If applied, this commit will... --> Fix the deprecation warning that appears on NixOS 24.11+ when using GoReleaser-generated nix packages: ``` evaluation warning: 'system' has been renamed to/replaced by 'stdenv.hostPlatform.system' ``` The change: - Removes the `system ? builtins.currentSystem` function parameter - Derives `system` from `stdenvNoCC.hostPlatform.system` in the let block - Reformats function parameters to use consistent Nix style - Removes the redundant `system = system;` derivation attribute <!-- Why is this change being made? --> The old pattern had two issues: 1. **Function parameter**: `system ? builtins.currentSystem` — when `callPackage` passes arguments, it provides `pkgs.system` which is now a deprecated alias 2. **Derivation attribute**: `system = system;` — redundant since `stdenvNoCC.mkDerivation` already sets this via `stdenv.hostPlatform.system` This change is safe because: - The `system` variable remains available in the template for URL/SHA map lookups - `stdenvNoCC.hostPlatform.system` is the canonical, non-deprecated way to access platform information - This improves cross-compilation support (the original motivation for the deprecation) - Tested on NixOS unstable — packages build and run correctly <!-- Provide links to any relevant tickets, URLs or other resources --> - [NixOS Discourse: How to fix the 'system' deprecation warning](https://discourse.nixos.org/t/how-to-fix-evaluation-warning-system-has-been-renamed-to-replaced-by-stdenv-hostplatform-system/72120) - [Blog: Nix best practices for system handling](https://isabelroses.com/blog/im-not-mad-im-disappointed/) - [nixpkgs Issue #27069: Reduce redundant ways to inspect platforms](NixOS/nixpkgs#27069) - [nixpkgs PR #209816: Deprecate toplevel platform attributes](NixOS/nixpkgs#209816) --- **Testing:** - [x] All existing nix pipe tests pass locally - [x] golangci-lint passes with 0 issues - [x] `task build` succeeds - [x] Manually tested generated packages (dagger, container-use) on NixOS unstable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
deprecation was attempted in e51f736 #46059
but had to be reverted in 2a6e4ae #46517
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes