This repository has no description
1.5 kB
49 lines
1# llm-agents' orca with a working darwin launcher. Upstream links
2# bin/orca-ide straight to Orca.app/Contents/MacOS/Orca; Electron then looks
3# for its helper apps relative to the symlink and dies with "Unable to find
4# helper app". Executing the binary by its real path inside the bundle works.
5{
6 stdenvNoCC,
7 runtimeShell,
8 fetchurl,
9 llm-agents,
10}:
11let
12 # stablyai deleted the v1.4.225 and v1.4.226 releases, so llm-agents' src 404s.
13 version = "1.4.224";
14 platforms = {
15 x86_64-linux = {
16 file = "orca-ide_${version}_amd64.deb";
17 hash = "sha256-8Dolyl9dHc5Nl5uCOGXevEC0ikGYsbqAbR9KtXYHbAo=";
18 };
19 aarch64-linux = {
20 file = "orca-ide_${version}_arm64.deb";
21 hash = "sha256-89BqCDSQaJzTymaIHtJwfHj2MTTSptk5KEruAFov/NE=";
22 };
23 aarch64-darwin = {
24 file = "Orca-${version}-arm64-mac.zip";
25 hash = "sha256-3tqvPVAipAYnHA0JpL6l2jsXwu32DpGcfkqxKDrXqBQ=";
26 };
27 };
28 platform = platforms.${stdenvNoCC.hostPlatform.system};
29 pinned = llm-agents.orca.overrideAttrs {
30 inherit version;
31 src = fetchurl {
32 url = "https://github.com/stablyai/orca/releases/download/v${version}/${platform.file}";
33 inherit (platform) hash;
34 };
35 };
36in
37if stdenvNoCC.hostPlatform.isDarwin then
38 pinned.overrideAttrs (old: {
39 postInstall = (old.postInstall or "") + ''
40 rm $out/bin/orca-ide
41 cat >$out/bin/orca-ide <<EOF
42 #!${runtimeShell}
43 exec "$out/Applications/Orca.app/Contents/MacOS/Orca" "\$@"
44 EOF
45 chmod +x $out/bin/orca-ide
46 '';
47 })
48else
49 pinned