Loading
llm.tests: fix the eval
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.