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 <clio-agent@sisyphuslabs.ai>
This commit is contained in:
m3tm3re
2026-04-03 11:13:10 +02:00
parent 85fd377ab1
commit ec6b3b9683

View File

@@ -194,6 +194,15 @@ in
-exec sed -i 's|^Exec=OpenWork.*|Exec=openwork|' {} + -exec sed -i 's|^Exec=OpenWork.*|Exec=openwork|' {} +
wrapProgram $out/bin/openwork \ wrapProgram $out/bin/openwork \
--set WEBKIT_DISABLE_COMPOSITING_MODE 1 --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 = { meta = {