[Nix/macOS] Build fails with 'Operation not permitted' on Windows DLL - Regression since Jan 2026 #4954

Closed
opened 2026-02-16 17:46:58 -05:00 by yindo · 0 comments
Owner

Originally created by @jerome-benoit on GitHub (Jan 12, 2026).

Originally assigned to: @thdxr on GitHub.

Description

The Nix flake build for OpenCode fails on macOS with "Operation not permitted" error when trying to copy Windows DLL files during the install phase. This is a recent regression - the build was working on macOS before January 2026.

Error:

cp: cannot open './node_modules/.bun/@opentui+core-win32-x64@0.1.72/node_modules/@opentui/core-win32-x64/opentui.dll' for reading: Operation not permitted

Root cause: The installPhase in nix/opencode.nix attempts to copy ALL platform-specific binaries including Windows DLLs, which cannot be read on macOS.

Related to: #4853 (package size due to all platforms), #7540 (Arch Linux build failure)

Plugins

No response

OpenCode version

1.1.14

Steps to reproduce

  1. On macOS, add OpenCode flake to your flake.nix:
inputs.opencode.url = "github:anomalyco/opencode";
  1. Run home-manager switch or nix build github:anomalyco/opencode

  2. Build fails during installPhase with "Operation not permitted" error on Windows DLL files

Screenshot and/or share link

Full error log:

error: Cannot build '/nix/store/7wfsv4gmzwha84hf6nbk25gvvk09n4hz-opencode-node_modules-1.1.14.drv'.
       > cp: cannot open './node_modules/.bun/@opentui+core-win32-x64@0.1.72/node_modules/@opentui/core-win32-x64/opentui.dll' for reading: Operation not permitted

Operating System

macOS (aarch64-darwin)

Terminal

iTerm2

Originally created by @jerome-benoit on GitHub (Jan 12, 2026). Originally assigned to: @thdxr on GitHub. ### Description The Nix flake build for OpenCode fails on macOS with "Operation not permitted" error when trying to copy Windows DLL files during the install phase. This is a **recent regression** - the build was working on macOS before January 2026. **Error:** ``` cp: cannot open './node_modules/.bun/@opentui+core-win32-x64@0.1.72/node_modules/@opentui/core-win32-x64/opentui.dll' for reading: Operation not permitted ``` **Root cause:** The `installPhase` in `nix/opencode.nix` attempts to copy ALL platform-specific binaries including Windows DLLs, which cannot be read on macOS. **Related to:** #4853 (package size due to all platforms), #7540 (Arch Linux build failure) ### Plugins _No response_ ### OpenCode version 1.1.14 ### Steps to reproduce 1. On macOS, add OpenCode flake to your `flake.nix`: ```nix inputs.opencode.url = "github:anomalyco/opencode"; ``` 2. Run `home-manager switch` or `nix build github:anomalyco/opencode` 3. Build fails during `installPhase` with "Operation not permitted" error on Windows DLL files ### Screenshot and/or share link Full error log: ``` error: Cannot build '/nix/store/7wfsv4gmzwha84hf6nbk25gvvk09n4hz-opencode-node_modules-1.1.14.drv'. > cp: cannot open './node_modules/.bun/@opentui+core-win32-x64@0.1.72/node_modules/@opentui/core-win32-x64/opentui.dll' for reading: Operation not permitted ``` ### Operating System macOS (aarch64-darwin) ### Terminal iTerm2
yindo added the nix label 2026-02-16 17:46:58 -05:00
yindo closed this issue 2026-02-16 17:46:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4954