Add agent CLI wrappers to T3 Code packages
- Wire llm-agents into the flake - Expose optional codex, Claude Code, and OpenCode paths in desktop and server wrappers
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
asar,
|
||||
stdenv,
|
||||
bun,
|
||||
codex ? null,
|
||||
claudeCode ? null,
|
||||
electron_40,
|
||||
gcc,
|
||||
git,
|
||||
@@ -11,9 +13,13 @@
|
||||
makeWrapper,
|
||||
node-gyp,
|
||||
nodejs,
|
||||
opencode ? null,
|
||||
pkg-config,
|
||||
python3,
|
||||
writableTmpDirAsHomeHook,
|
||||
withClaudeCode ? false,
|
||||
withCodex ? false,
|
||||
withOpencode ? false,
|
||||
xdg-utils,
|
||||
}: let
|
||||
common = import ../common.nix {
|
||||
@@ -30,6 +36,9 @@
|
||||
pname = "t3code-desktop";
|
||||
version = desktopPackageJson.version;
|
||||
in
|
||||
assert lib.assertMsg (!withCodex || codex != null) "withCodex requires a codex package";
|
||||
assert lib.assertMsg (!withClaudeCode || claudeCode != null) "withClaudeCode requires a claudeCode package";
|
||||
assert lib.assertMsg (!withOpencode || opencode != null) "withOpencode requires an opencode package";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
inherit pname version;
|
||||
inherit src;
|
||||
@@ -169,9 +178,16 @@ in
|
||||
--set-default ELECTRON_FORCE_IS_PACKAGED 1 \
|
||||
--set-default ELECTRON_IS_DEV 0 \
|
||||
--prefix PATH : ${lib.makeBinPath [
|
||||
git
|
||||
xdg-utils
|
||||
]} \
|
||||
git
|
||||
xdg-utils
|
||||
]} \
|
||||
${lib.optionalString withCodex ''
|
||||
--prefix PATH : "${lib.makeBinPath [ codex ]}" \
|
||||
''}${lib.optionalString withClaudeCode ''
|
||||
--prefix PATH : "${lib.makeBinPath [ claudeCode ]}" \
|
||||
''}${lib.optionalString withOpencode ''
|
||||
--prefix PATH : "${lib.makeBinPath [ opencode ]}" \
|
||||
''} \
|
||||
--add-flags "$out/share/${pname}/resources/app.asar"
|
||||
|
||||
export out
|
||||
|
||||
Reference in New Issue
Block a user