From c1d7da1451a17cf45c31cf94c0c25d4d5ec38539 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 13 Jan 2026 21:41:02 +0000 Subject: [PATCH] llm.tests: fix the eval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without the change `llm.tests` fails the eval on `master` as: $ nix build --no-link -f. llm.tests error: … in the right operand of the update (//) operator at lib/attrsets.nix:1619:60: 1618| # The invariant is satisfied because each half will have at least 1 element 1619| binaryMerge start (start + (end - start) / 2) // binaryMerge (start + (end - start) / 2) end | ^ 1620| else … in the left operand of the update (//) operator at lib/attrsets.nix:1619:11: 1618| # The invariant is satisfied because each half will have at least 1 element 1619| binaryMerge start (start + (end - start) / 2) // binaryMerge (start + (end - start) / 2) end | ^ 1620| else (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: attribute 'tests' missing at pkgs/development/python-modules/llm/default.nix:262:46: 261| # include tests for all the plugins 262| tests = lib.mergeAttrsList (map (name: python.pkgs.${name}.tests) withPluginsArgNames); | ^ 263| }; It happens because `python.pkgs.llm-lmstudio.tests` attribute does not exist. THe change adds a fallback for packages without tests attributes. --- pkgs/development/python-modules/llm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/llm/default.nix b/pkgs/development/python-modules/llm/default.nix index f50ae25ec263..78ec739553f6 100644 --- a/pkgs/development/python-modules/llm/default.nix +++ b/pkgs/development/python-modules/llm/default.nix @@ -259,7 +259,7 @@ let }; # include tests for all the plugins - tests = lib.mergeAttrsList (map (name: python.pkgs.${name}.tests) withPluginsArgNames); + tests = lib.mergeAttrsList (map (name: python.pkgs.${name}.tests or { }) withPluginsArgNames); }; meta = {