Skip to content

nix: drop removed darwin.apple_sdk frameworks from dev shell - #77

Merged
wesnel merged 1 commit into
ci-maven-downloadfrom
nix-drop-apple-sdk
Nov 13, 2026
Merged

wesnel merged 1 commit into
ci-maven-downloadfrom
nix-drop-apple-sdk

Conversation

@wesnel

@wesnel wesnel commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

On macOS, direnv allow (or nix develop) fails to evaluate the dev shell with the pinned nixpkgs:

error: darwin.apple_sdk_11_0 has been removed as it was a legacy compatibility stub

nixpkgs has removed darwin.apple_sdk. The Darwin stdenv now ships the default macOS SDK with all its frameworks, so the dev shell no longer lists Security itself (migration notes). libiconv stays. This is the same fix as ngrok/ngrok-rust#208.

This also drops inputs.nixpkgs.follows from flake-utils: flake-utils has no nixpkgs input, so the override only produced a warning. flake.lock is unchanged.

Stacked on #78, which fixes the CI job that fails on main.

Validation

On aarch64-darwin, with the existing flake.lock:

  • nix eval .#devShell.aarch64-darwin.drvPath fails with the error above before this change and succeeds after it, without the flake-utils warning.
  • nix develop builds the shell; cargo, rustc, cargo udeps, java (17) and mvn run in it.
  • mvn -pl ngrok-java-native -am -DskipTests package succeeds in the shell, and the built libngrok_java.dylib links Security.framework and CoreFoundation.framework from /System/Library/Frameworks, and libiconv from Nix.
  • nix eval .#devShell.x86_64-linux.drvPath gives the same derivation before and after.

Weak spots, assumptions and decisions

  • No CI job uses the flake, so CI does not exercise this change; it was checked on one aarch64-darwin machine.
  • Relies on the stdenv's default macOS SDK rather than pinning one; the alternative is a specific apple-sdk_* package in buildInputs, which would be needed if a future nixpkgs default SDK dropped something the native crate links.

Reverting

A two-way door: it touches only the dev shell definition. Reverting it breaks the dev shell on macOS again with the current flake.lock; nothing else is left behind.

nixpkgs removed darwin.apple_sdk, so on macOS evaluating the dev shell
with the pinned nixpkgs fails with "darwin.apple_sdk_11_0 has been
removed as it was a legacy compatibility stub". The Darwin stdenv now
ships the default macOS SDK with all its frameworks, so the shell no
longer needs to list Security itself. libiconv stays.

flake-utils has no nixpkgs input, so its follows override only produced
a warning; drop it too. flake.lock is unchanged.
@wesnel
wesnel force-pushed the nix-drop-apple-sdk branch from fb1de98 to 642a2ba Compare November 11, 2026 22:00
@wesnel
wesnel changed the base branch from main to ci-maven-download November 11, 2026 22:00
@wesnel
wesnel added this pull request to stack #79 November 11, 2026 23:43
@wesnel
wesnel marked this pull request as ready for review November 12, 2026 00:09
@joshbottelberghe joshbottelberghe self-assigned this Nov 12, 2026
@wesnel
wesnel merged commit 1a595a3 into main Nov 13, 2026
10 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.

2 participants