Skip to content

fix(flake): use stdenv.hostPlatform.isDarwin in commonArgs - #4132

Merged
max-sixty merged 1 commit into
max-sixty:mainfrom
ashebanow:fix/deprecated-stdenv-isdarwin
Sep 16, 2026
Merged

max-sixty merged 1 commit into
max-sixty:mainfrom
ashebanow:fix/deprecated-stdenv-isdarwin

Conversation

@ashebanow

Copy link
Copy Markdown
Contributor

Fixes #4131.

pkgs.stdenv.isDarwin is a deprecated alias in nixpkgs: it is defined as lib.warn "stdenv.isDarwin is deprecated, use stdenv.hostPlatform.isDarwin instead" wrapping the real value (pkgs/stdenv/generic/default.nix, added 2026-05-09). Reading it emits that warning on every evaluation of this flake, so downstream consumers see it on every nix develop, and it becomes a hard error once nixpkgs drops the alias.

stdenv.hostPlatform.isDarwin is the identical boolean, so libiconv is still selected on Darwin and the build inputs are unchanged. flake.nix:245 already uses pkgs.stdenv.hostPlatform.system, as does nix/home-manager-module.nix, so this makes the file consistent with its own convention.

Verified with nix flake check (all outputs evaluate); the warning is gone from an evaluating consumer. No behavior change.

`pkgs.stdenv.isDarwin` is a deprecated alias in nixpkgs — it is defined as
`lib.warn "stdenv.isDarwin is deprecated, use stdenv.hostPlatform.isDarwin
instead"` wrapping the real value (pkgs/stdenv/generic/default.nix, added
2026-05-09). Reading it emits that warning on every evaluation of this flake,
so downstream consumers see it on every `nix develop`, and it becomes a hard
error once nixpkgs drops the alias.

`stdenv.hostPlatform.isDarwin` is the identical boolean, so libiconv is still
selected on Darwin and the build inputs are unchanged.
ashebanow added a commit to ashebanow/nix-config that referenced this pull request Sep 16, 2026
…update

`nix flake update` moved nixpkgs to ef34387, where `typescript-go` stopped
being a deprecation-warning alias and became a bare `throw`:

  typescript-go = throw "'typescript-go' has been renamed to/replaced by 'typescript'";

pi.nix's `coding-agent` still takes `typescript-go` as a callPackage
argument, and `inputs.nixpkgs.follows = "nixpkgs"` puts pi.nix on our
nixpkgs, so evaluating pi-coding-agent aborts the whole dev shell. Nothing
in this repo referenced the old name; the update simply armed an upstream
reference that already existed.

Override the argument with `pkgs.typescript` — the same derivation the old
name used to resolve to — so the shell evaluates. Drop the override once
pi.nix renames its argument; tracked as lukasl-dev/pi.nix#21.

The same update also pulled a worktrunk commit whose flake read the
deprecated `stdenv.isDarwin` alias, which warned on every evaluation. That
is fixed on the fork branch (ashebanow/worktrunk
fix/deprecated-stdenv-isdarwin) and picked up here; upstream PR:
max-sixty/worktrunk#4132.

Verified: `nix develop` evaluates with no warnings, `pi --version` and
`wt --version` both run.
ashebanow added a commit to ashebanow/nix-config that referenced this pull request Sep 16, 2026
The fork carried the Pi/oh-my-pi split on the branch that is also the
upstream PR, so `nix flake update` pinned history the PR is expected to
rewrite. Split the two roles:

  feat/pi-and-omp-plugin-targets  the PR; rebased at will, so pinning it
                                  means a force-push breaks flake.lock
  nix-pin                         what this input reads; append-only,
                                  fast-forwarded once a rebase is tested

The split also landed 38 commits behind upstream and conflicted there
(4 doc files), so the pin moves to a rebased `nix-pin` tip. The doc
conflicts were resolved in the primary
(`docs/src/content/docs/claude-code.md`: upstream's `/wt-switch-create`
"skill" wording plus the fork's oh-my-pi column) and regenerated into the
three mirrors.

The rebased tip still carries the `stdenv.hostPlatform.isDarwin` fix
(max-sixty/worktrunk#4132); drop that commit from `nix-pin` once it lands
upstream.

Verified: `nix develop` evaluates with no warnings, `pi 0.85.1` and
`wt 1f62bfc` both run.
@max-sixty

Copy link
Copy Markdown
Owner

thanks @ashebanow !

@max-sixty
max-sixty merged commit d4263b3 into max-sixty:main Sep 16, 2026
45 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.

flake.nix reads the deprecated stdenv.isDarwin alias, warning on every evaluation

3 participants