Skip to content

build(nix): use stdenv.hostPlatform for platform checks - #1125

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
luizribeiro:nix-stdenv-hostplatform
Oct 28, 2026
Merged

0xShug0 merged 1 commit into
0xShug0:mainfrom
luizribeiro:nix-stdenv-hostplatform

Conversation

@luizribeiro

Copy link
Copy Markdown
Contributor

stdenv.isLinux and stdenv.isDarwin are deprecated in nixpkgs, so every flake that uses audio.cpp as an input prints:

evaluation warning: stdenv.isLinux is deprecated, use stdenv.hostPlatform.isLinux instead

This renames the 6 uses in flake.nix and .devops/nix/package.nix to stdenv.hostPlatform.isLinux / isDarwin. Same semantics, build wiring only: no change to outputs, performance or memory.

I checked that x86_64-linux and aarch64-darwin still evaluate the same packages as before (linux: cpu, cuda, default, python-scripts, rocm, rocm-gfx1151, vulkan; darwin: cpu, default, metal, python-scripts, vulkan), now with no warnings.

stdenv.isLinux and stdenv.isDarwin are deprecated in nixpkgs and print an
evaluation warning in every consumer of this flake:

  evaluation warning: stdenv.isLinux is deprecated, use stdenv.hostPlatform.isLinux instead

Switch to the stdenv.hostPlatform equivalents. Behaviour is unchanged:
x86_64-linux and aarch64-darwin evaluate the same package sets, now with
no warnings.
@0xShug0
0xShug0 merged commit 8f1cc67 into 0xShug0:main Oct 28, 2026
7 checks passed
@0xShug0

0xShug0 commented Oct 28, 2026

Copy link
Copy Markdown
Owner

@luizribeiro Thanks for the cleanup! PR merged.

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.

2 participants