diff --git a/pkgs/openwork/default.nix b/pkgs/openwork/default.nix index b019c2e..3937945 100644 --- a/pkgs/openwork/default.nix +++ b/pkgs/openwork/default.nix @@ -179,10 +179,15 @@ in pnpm --filter @openwork/app build ''; - # Tauri installs the binary using productName ("OpenWork") on Linux. - # Rename to lowercase and fix the .desktop Exec= entry. - # Also disable WebKit GPU compositing, which breaks Wayland input event - # routing and causes clicks to be completely unresponsive. + # Remove internal Tauri sidecar binaries BEFORE fixupPhase so that + # wrapGAppsHook3 never sees them and never creates .opencode-wrapped + # (or similar) files that would conflict with other packages in buildEnv. + preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' + for sidecar in opencode opencode-router openwork-server openwork-orchestrator chrome-devtools-mcp versions.json; do + rm -f "$out/bin/$sidecar" + done + ''; + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' for name in OpenWork "OpenWork-Dev"; do if [ -f "$out/bin/$name" ]; then @@ -194,15 +199,6 @@ 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 = {