fix: LLM-Agents overlay
This commit is contained in:
+25
-4
@@ -7,7 +7,7 @@
|
|||||||
# This one contains whatever you want to overlay
|
# This one contains whatever you want to overlay
|
||||||
# You can change versions, add patches, set compilation flags, anything really.
|
# You can change versions, add patches, set compilation flags, anything really.
|
||||||
# https://nixos.wiki/wiki/Overlays
|
# https://nixos.wiki/wiki/Overlays
|
||||||
modifications = final: prev: {
|
modifications = _final: _prev: {
|
||||||
# n8n = import ./mods/n8n.nix {inherit prev;};
|
# n8n = import ./mods/n8n.nix {inherit prev;};
|
||||||
|
|
||||||
# brave = prev.brave.override {
|
# brave = prev.brave.override {
|
||||||
@@ -64,15 +64,36 @@
|
|||||||
# recursion that occurs when accessing final/prev.system while the fixed-point
|
# recursion that occurs when accessing final/prev.system while the fixed-point
|
||||||
# is still being computed. Exposed via outputs.lib, not outputs.overlays.
|
# is still being computed. Exposed via outputs.lib, not outputs.overlays.
|
||||||
#
|
#
|
||||||
# Filters out the 16 internal helpers (marked `passthru.hideFromDocs = true`
|
# Use llm-agents' shared-nixpkgs overlay so packages with optional GPU support
|
||||||
|
# (notably qmd) are built against this system's pkgs/config. Using the flake's
|
||||||
|
# pre-built `packages.${system}` set pins them to llm-agents' own nixpkgs,
|
||||||
|
# where allowUnfree is false; qmd.override { cudaSupport = true; } then fails
|
||||||
|
# on CUDA EULA packages during the m3-ares NVIDIA specialisation build.
|
||||||
|
#
|
||||||
|
# Keep the exposed top-level package names aligned with llm-agents' filtered
|
||||||
|
# flake packages, but take the package values from the shared package set.
|
||||||
|
# Filters out internal helpers (marked `passthru.hideFromDocs = true`
|
||||||
# upstream) that would otherwise clobber nixpkgs attributes. Most critically
|
# upstream) that would otherwise clobber nixpkgs attributes. Most critically
|
||||||
# this excludes `buildNpmPackage` — llm-agents' buildNpmPackage is a guarded
|
# this excludes `buildNpmPackage` — llm-agents' buildNpmPackage is a guarded
|
||||||
# re-export whose `__functor`/`override` interaction with makeOverridable
|
# re-export whose `__functor`/`override` interaction with makeOverridable
|
||||||
# breaks any package (e.g. nixpkgs' webcord) that calls
|
# breaks any package (e.g. nixpkgs' webcord) that calls
|
||||||
# `buildNpmPackage.override { nodejs = ...; }`. See numtide/llm-agents.nix
|
# `buildNpmPackage.override { nodejs = ...; }`. See numtide/llm-agents.nix
|
||||||
# commit 40490259 and the wrapper at packages/buildNpmPackage/package.nix.
|
# commit 40490259 and the wrapper at packages/buildNpmPackage/package.nix.
|
||||||
mkLlmAgentsOverlay = system: _final: _prev:
|
mkLlmAgentsOverlay = system: final: prev: let
|
||||||
builtins.removeAttrs (inputs.llm-agents.packages.${system} or {}) [
|
sharedPackages = (inputs.llm-agents.overlays.shared-nixpkgs final prev).llm-agents or {};
|
||||||
|
exposedPackageNames =
|
||||||
|
builtins.filter
|
||||||
|
(name: inputs.nixpkgs.lib.hasAttrByPath [name] sharedPackages)
|
||||||
|
(builtins.attrNames (inputs.llm-agents.packages.${system} or {}));
|
||||||
|
exposedPackages =
|
||||||
|
builtins.listToAttrs
|
||||||
|
(map (name: {
|
||||||
|
inherit name;
|
||||||
|
value = sharedPackages.${name};
|
||||||
|
})
|
||||||
|
exposedPackageNames);
|
||||||
|
in
|
||||||
|
builtins.removeAttrs exposedPackages [
|
||||||
# Internal helpers from packages/* marked hideFromDocs upstream:
|
# Internal helpers from packages/* marked hideFromDocs upstream:
|
||||||
"antigravity"
|
"antigravity"
|
||||||
"auto-claude"
|
"auto-claude"
|
||||||
|
|||||||
Reference in New Issue
Block a user