devbox
devbox copied to clipboard
`devbox add elixir` fails on MacOS
What happened?
I consistently receive an error when trying to run devbox add elixir in a new project in MacOS (Tahoe, Apple silicon):
Error: error installing package darwin.apple_sdk.frameworks.CoreServices
source: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' path-info 'github:NixOS/nixpkgs/a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0#darwin.apple_sdk.frameworks.CoreServices' --json --impure: darwin.apple_sdk_11_0 has been removed as it was a legacy compatibility stub; see <https://nixos.org/manual/nixpkgs/stable/#sec-darwin-legacy-frameworks> for migration instructions: exit code 1
Notably:
- It works fine on a Linux machine.
- Other packages work fine (e.g.
devbox add nodejs). - The
elixirpackage in Nix seems to work fine by itself (e.g.nix-shell --packages elixir). - The same problem occurred when trying other approaches (e.g. manually updating
packagesindevbox.jsonand runningdevbox install).
Steps to reproduce
devbox initdevbox add elixir
Command
add
devbox.json
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
"packages": [],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
Devbox version
0.16.0
Nix version
nix (Determinate Nix 3.11.2) 2.31.1
What system does this bug occur on?
macOS (Apple Silicon)
Debug logs
time=2025-09-23T21:36:04.583+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:126 msg="searching for config file (including parent directories)" path=.
time=2025-09-23T21:36:04.583+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:147 msg="trying config file" path=devbox.json
time=2025-09-23T21:36:04.583+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:134 msg="config file found" path=/Users/me/code/my-project/devbox.json dur=221.959µs
time=2025-09-23T21:36:04.583+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=nodejs mode=auto
time=2025-09-23T21:36:04.583+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:126 msg="searching for config file (including parent directories)" path=.
time=2025-09-23T21:36:04.583+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:147 msg="trying config file" path=devbox.json
time=2025-09-23T21:36:04.583+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:134 msg="config file found" path=/Users/me/code/my-project/devbox.json dur=31.125µs
time=2025-09-23T21:36:04.583+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=nodejs mode=auto
time=2025-09-23T21:36:04.596+01:00 level=DEBUG source=go.jetify.com/devbox/nix/nix.go:143 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' --version --debug"
time=2025-09-23T21:36:04.637+01:00 level=DEBUG source=go.jetify.com/devbox/nix/nix.go:143 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' --version --debug" cmd.path=/nix/var/nix/profiles/default/bin/nix cmd.pid=35960 cmd.code=0 cmd.dur=41.642833ms
time=2025-09-23T21:36:04.638+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:126 msg="searching for config file (including parent directories)" path=.
time=2025-09-23T21:36:04.638+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:147 msg="trying config file" path=devbox.json
time=2025-09-23T21:36:04.638+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:134 msg="config file found" path=/Users/me/code/my-project/devbox.json dur=97.959µs
time=2025-09-23T21:36:04.638+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=nodejs mode=auto
time=2025-09-23T21:36:04.638+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=nodejs mode=auto
time=2025-09-23T21:36:04.638+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=elixir mode=auto
time=2025-09-23T21:36:04.638+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=nodejs mode=auto
time=2025-09-23T21:36:04.638+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=elixir mode=auto
time=2025-09-23T21:36:04.805+01:00 level=DEBUG source=go.jetify.com/devbox/internal/nix/store.go:145 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' store info --store daemon --json"
time=2025-09-23T21:36:04.854+01:00 level=DEBUG source=go.jetify.com/devbox/internal/nix/store.go:145 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' store info --store daemon --json" cmd.path=/nix/var/nix/profiles/default/bin/nix cmd.pid=35962 cmd.code=0 cmd.dur=48.901208ms
time=2025-09-23T21:36:04.854+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devbox/providers/nixcache/setup.go:86 msg="nixcache: running setup: first time setup"
Info: Adding package "elixir@latest" to devbox.json
time=2025-09-23T21:36:04.919+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=nodejs mode=auto
time=2025-09-23T21:36:04.919+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=elixir mode=auto
time=2025-09-23T21:36:04.919+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=darwin.apple_sdk.frameworks.CoreServices mode=auto
time=2025-09-23T21:36:04.919+01:00 level=DEBUG source=go.jetify.com/devbox/internal/plugin/plugin.go:85 msg="creating files for package" pkg=nodejs@latest
time=2025-09-23T21:36:04.919+01:00 level=DEBUG source=go.jetify.com/devbox/internal/plugin/plugin.go:85 msg="creating files for package" pkg=elixir@latest
time=2025-09-23T21:36:04.919+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=darwin.apple_sdk.frameworks.CoreServices mode=auto
time=2025-09-23T21:36:04.919+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=nodejs mode=auto
time=2025-09-23T21:36:04.919+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=elixir mode=auto
time=2025-09-23T21:36:05.022+01:00 level=DEBUG source=go.jetify.com/devbox/internal/nix/store.go:40 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' path-info 'github:NixOS/nixpkgs/a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0#darwin.apple_sdk.frameworks.CoreServices' --json --impure"
time=2025-09-23T21:36:05.252+01:00 level=DEBUG source=go.jetify.com/devbox/internal/nix/store.go:40 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' path-info 'github:NixOS/nixpkgs/a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0#darwin.apple_sdk.frameworks.CoreServices' --json --impure" cmd.path=/nix/var/nix/profiles/default/bin/nix cmd.stderr="darwin.apple_sdk_11_0 has been removed as it was a legacy compatibility stub; see <https://nixos.org/manual/nixpkgs/stable/#sec-darwin-legacy-frameworks> for migration instructions" cmd.pid=35965 cmd.code=1 cmd.dur=230.304417ms
Error: error installing package darwin.apple_sdk.frameworks.CoreServices
source: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' path-info 'github:NixOS/nixpkgs/a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0#darwin.apple_sdk.frameworks.CoreServices' --json --impure: darwin.apple_sdk_11_0 has been removed as it was a legacy compatibility stub; see <https://nixos.org/manual/nixpkgs/stable/#sec-darwin-legacy-frameworks> for migration instructions: exit code 1
time=2025-09-23T21:36:05.255+01:00 level=ERROR source=go.jetify.com/devbox/internal/boxcli/midcobra/debug.go:68 msg="command error" stderr="error:\n … while calling the 'throw' builtin\n at /nix/store/qa2ws32q0k7r95blwg4lsqfgx7mjbszj-source/pkgs/top-level/darwin-aliases.nix:52:5:\n 51| name:\n 52| throw \"darwin.${name} has been removed as it was a legacy compatibility stub; see <https://nixos.org/manual/nixpkgs/stable/#sec-darwin-legacy-frameworks> for migration instructions\";\n | ^\n 53|\n\n error: darwin.apple_sdk_11_0 has been removed as it was a legacy compatibility stub; see <https://nixos.org/manual/nixpkgs/stable/#sec-darwin-legacy-frameworks> for migration instructions\n" execid=afb4c76c28e34d949faae4d1f0a0adf0 stack=<nil>
time=2025-09-23T21:36:05.255+01:00 level=ERROR source=go.jetify.com/devbox/internal/boxcli/midcobra/debug.go:70 msg="command error" execid=afb4c76c28e34d949faae4d1f0a0adf0 stack=<nil>
time=2025-09-23T21:36:05.255+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:126 msg="searching for config file (including parent directories)" path=.
time=2025-09-23T21:36:05.255+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:147 msg="trying config file" path=devbox.json
time=2025-09-23T21:36:05.256+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:134 msg="config file found" path=/Users/me/code/my-project/devbox.json dur=92.667µs
time=2025-09-23T21:36:05.256+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devpkg/package.go:204 msg="package doesn't need patching" pkg=nodejs mode=auto