···11+# llm-agents' orca with a working darwin launcher. Upstream links
22+# bin/orca-ide straight to Orca.app/Contents/MacOS/Orca; Electron then looks
33+# for its helper apps relative to the symlink and dies with "Unable to find
44+# helper app". Executing the binary by its real path inside the bundle works.
55+{
66+ stdenvNoCC,
77+ runtimeShell,
88+ llm-agents,
99+}:
1010+if stdenvNoCC.hostPlatform.isDarwin then
1111+ llm-agents.orca.overrideAttrs (old: {
1212+ postInstall = (old.postInstall or "") + ''
1313+ rm $out/bin/orca-ide
1414+ cat >$out/bin/orca-ide <<EOF
1515+ #!${runtimeShell}
1616+ exec "$out/Applications/Orca.app/Contents/MacOS/Orca" "\$@"
1717+ EOF
1818+ chmod +x $out/bin/orca-ide
1919+ '';
2020+ })
2121+else
2222+ llm-agents.orca