fix(packages): gate codex on platform support
This commit is contained in:
parent
e019a60b4e
commit
15561a3201
3 changed files with 30 additions and 6 deletions
|
|
@ -1,6 +1,11 @@
|
|||
{ pkgs, llm-agents }:
|
||||
let
|
||||
upstream = llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.codex;
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
upstream =
|
||||
if builtins.hasAttr system llm-agents.packages then
|
||||
llm-agents.packages.${system}.codex
|
||||
else
|
||||
throw "codex: llm-agents does not provide packages.${system} (supported: ${builtins.concatStringsSep ", " (builtins.attrNames llm-agents.packages)})";
|
||||
manifest = pkgs.writeText "codex-package.json" (
|
||||
builtins.toJSON {
|
||||
layoutVersion = 1;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
{ pkgs, llm-agents, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
llm-agents,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# llm-agents does not publish every platform (it dropped x86_64-darwin), so
|
||||
# expose codex only where the input provides it.
|
||||
hasCodex = builtins.hasAttr pkgs.stdenv.hostPlatform.system llm-agents.packages;
|
||||
in
|
||||
{
|
||||
cf = pkgs.callPackage ./cf.nix { };
|
||||
codex = pkgs.callPackage ./codex.nix { inherit llm-agents; };
|
||||
pikpak-cli = pkgs.callPackage ./pikpak-cli.nix { };
|
||||
}
|
||||
// lib.optionalAttrs hasCodex {
|
||||
codex = pkgs.callPackage ./codex.nix { inherit llm-agents; };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue