Refactor flake.nix, add Package suffix to cli package args
This commit is contained in:
@@ -32,17 +32,15 @@
|
|||||||
packages = forAllSystems (
|
packages = forAllSystems (
|
||||||
system: let
|
system: let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
|
src = t3code;
|
||||||
|
codexPackage = llm-agents.packages.${system}.codex;
|
||||||
|
claudeCodePackage = llm-agents.packages.${system}."claude-code";
|
||||||
|
opencodePackage = llm-agents.packages.${system}.opencode;
|
||||||
t3code-desktop = pkgs.callPackage ./packages/t3code-desktop {
|
t3code-desktop = pkgs.callPackage ./packages/t3code-desktop {
|
||||||
src = t3code;
|
inherit src codexPackage claudeCodePackage opencodePackage;
|
||||||
codex = llm-agents.packages.${system}.codex;
|
|
||||||
claudeCode = llm-agents.packages.${system}."claude-code";
|
|
||||||
opencode = llm-agents.packages.${system}.opencode;
|
|
||||||
};
|
};
|
||||||
t3code-server = pkgs.callPackage ./packages/t3code-server {
|
t3code-server = pkgs.callPackage ./packages/t3code-server {
|
||||||
src = t3code;
|
inherit src codexPackage claudeCodePackage opencodePackage;
|
||||||
codex = llm-agents.packages.${system}.codex;
|
|
||||||
claudeCode = llm-agents.packages.${system}."claude-code";
|
|
||||||
opencode = llm-agents.packages.${system}.opencode;
|
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
inherit t3code-desktop t3code-server;
|
inherit t3code-desktop t3code-server;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
symlinkJoin,
|
symlinkJoin,
|
||||||
bun,
|
bun,
|
||||||
codex ? null,
|
codexPackage ? null,
|
||||||
claudeCode ? null,
|
claudeCodePackage ? null,
|
||||||
electron_40,
|
electron_40,
|
||||||
gcc,
|
gcc,
|
||||||
git,
|
git,
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
makeWrapper,
|
makeWrapper,
|
||||||
node-gyp,
|
node-gyp,
|
||||||
nodejs,
|
nodejs,
|
||||||
opencode ? null,
|
opencodePackage ? null,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
python3,
|
python3,
|
||||||
writableTmpDirAsHomeHook,
|
writableTmpDirAsHomeHook,
|
||||||
@@ -198,14 +198,14 @@
|
|||||||
});
|
});
|
||||||
withAgentPath = withCodex || withClaudeCode || withOpencode;
|
withAgentPath = withCodex || withClaudeCode || withOpencode;
|
||||||
agentPath = lib.makeBinPath (
|
agentPath = lib.makeBinPath (
|
||||||
lib.optionals withCodex [codex]
|
lib.optionals withCodex [codexPackage]
|
||||||
++ lib.optionals withClaudeCode [claudeCode]
|
++ lib.optionals withClaudeCode [claudeCodePackage]
|
||||||
++ lib.optionals withOpencode [opencode]
|
++ lib.optionals withOpencode [opencodePackage]
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
assert lib.assertMsg (!withCodex || codex != null) "withCodex requires a codex package";
|
assert lib.assertMsg (!withCodex || codexPackage != null) "withCodex requires a codex package";
|
||||||
assert lib.assertMsg (!withClaudeCode || claudeCode != null) "withClaudeCode requires a claudeCode package";
|
assert lib.assertMsg (!withClaudeCode || claudeCodePackage != null) "withClaudeCode requires a claudeCode package";
|
||||||
assert lib.assertMsg (!withOpencode || opencode != null) "withOpencode requires an opencode package";
|
assert lib.assertMsg (!withOpencode || opencodePackage != null) "withOpencode requires an opencode package";
|
||||||
if withAgentPath
|
if withAgentPath
|
||||||
then
|
then
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
symlinkJoin,
|
symlinkJoin,
|
||||||
bun,
|
bun,
|
||||||
codex ? null,
|
codexPackage ? null,
|
||||||
claudeCode ? null,
|
claudeCodePackage ? null,
|
||||||
makeBinaryWrapper,
|
makeBinaryWrapper,
|
||||||
node-gyp,
|
node-gyp,
|
||||||
nodejs,
|
nodejs,
|
||||||
opencode ? null,
|
opencodePackage ? null,
|
||||||
python3,
|
python3,
|
||||||
writableTmpDirAsHomeHook,
|
writableTmpDirAsHomeHook,
|
||||||
withClaudeCode ? false,
|
withClaudeCode ? false,
|
||||||
@@ -129,14 +129,14 @@
|
|||||||
});
|
});
|
||||||
withAgentPath = withCodex || withClaudeCode || withOpencode;
|
withAgentPath = withCodex || withClaudeCode || withOpencode;
|
||||||
agentPath = lib.makeBinPath (
|
agentPath = lib.makeBinPath (
|
||||||
lib.optionals withCodex [codex]
|
lib.optionals withCodex [codexPackage]
|
||||||
++ lib.optionals withClaudeCode [claudeCode]
|
++ lib.optionals withClaudeCode [claudeCodePackage]
|
||||||
++ lib.optionals withOpencode [opencode]
|
++ lib.optionals withOpencode [opencodePackage]
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
assert lib.assertMsg (!withCodex || codex != null) "withCodex requires a codex package";
|
assert lib.assertMsg (!withCodex || codexPackage != null) "withCodex requires a codex package";
|
||||||
assert lib.assertMsg (!withClaudeCode || claudeCode != null) "withClaudeCode requires a claudeCode package";
|
assert lib.assertMsg (!withClaudeCode || claudeCodePackage != null) "withClaudeCode requires a claudeCode package";
|
||||||
assert lib.assertMsg (!withOpencode || opencode != null) "withOpencode requires an opencode package";
|
assert lib.assertMsg (!withOpencode || opencodePackage != null) "withOpencode requires an opencode package";
|
||||||
if withAgentPath
|
if withAgentPath
|
||||||
then
|
then
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
|
|||||||
Reference in New Issue
Block a user