Skip to content

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

@jerome-benoit

Description

@jerome-benoit

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/@[email protected]/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/@[email protected]/node_modules/@opentui/core-win32-x64/opentui.dll' for reading: Operation not permitted

Operating System

macOS (aarch64-darwin)

Terminal

iTerm2

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions