fix(packages): gate codex on platform support

This commit is contained in:
Rasyidan Akbar F. 2026-11-02 19:45:57 +07:00
commit 15561a3201
3 changed files with 30 additions and 6 deletions

View file

@ -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; };
}