From ec6b3b9683e612194694113aa744c458e6fe06dd Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Fri, 3 Apr 2026 11:13:10 +0200 Subject: [PATCH] fix: remove sidecar binaries from openwork $out/bin to fix buildEnv conflict openwork bundles opencode and other sidecars into bin/ during postFixup. These are internal Tauri app resources, not user-facing executables. When both openwork and opencode are installed in home-manager, buildEnv fails with a conflict on .opencode-wrapped. Remove sidecar binaries (opencode, opencode-router, openwork-server, openwork-orchestrator, chrome-devtools-mcp, versions.json) from $out/bin in postFixup so they don't leak into the top-level profile. Co-authored-by: Sisyphus --- pkgs/openwork/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/openwork/default.nix b/pkgs/openwork/default.nix index e8c7f66..b019c2e 100644 --- a/pkgs/openwork/default.nix +++ b/pkgs/openwork/default.nix @@ -194,6 +194,15 @@ in -exec sed -i 's|^Exec=OpenWork.*|Exec=openwork|' {} + wrapProgram $out/bin/openwork \ --set WEBKIT_DISABLE_COMPOSITING_MODE 1 + + # Remove internal Tauri sidecar binaries from $out/bin. + # These (opencode, opencode-router, openwork-server, openwork-orchestrator, + # chrome-devtools-mcp, versions.json) are bundled into the app's resource + # directory at runtime and must NOT be top-level executables — they conflict + # with packages (e.g. opencode) that expose the same wrapped binary names. + for sidecar in opencode opencode-router openwork-server openwork-orchestrator chrome-devtools-mcp versions.json; do + rm -f "$out/bin/$sidecar" + done ''; meta = {