update llm and plugins

This commit is contained in:
Daylin Morgan 2025-02-22 18:56:19 -06:00
parent d5b00e93ec
commit b41ebaff31
Signed by: daylin
GPG key ID: 950D13E9719334AD
2 changed files with 13 additions and 32 deletions

View file

@ -11,12 +11,12 @@ let
pluginAttr = {
anthropic = {
version = "0.12";
hash = "sha256-7+5j5jZBFfaaqnfjvLTI+mz1PUuG8sB5nD59UCpJuR4=";
version = "0.13";
hash = "sha256-eIppCyFu/2VKExkO88iRozC9AVDcRQaUKrNeLU89rrQ=";
};
gemini = {
version = "0.10";
hash = "sha256-+ghsBvEY8GQAphdvG7Rdu3T/7yz64vmkuA1VGvqw1fU=";
version = "0.11";
hash = "sha256-xYtfIajEU1iqHvSPDLmg9lHEllcKpVYyUuNZUGNcccw=";
};
cmd = {
version = "0.2a0";
@ -33,16 +33,8 @@ let
};
pluginPackages = pluginAttr |> mapAttrs mkPlugin |> attrValues;
pyWithLlm = (pkgs.python3.withPackages (_: [ llm ] ++ pluginPackages));
pyWithLlm = (
pkgs.python3.withPackages (
_:
[
llm
]
++ pluginPackages
)
);
in
pkgs.writeShellScriptBin "llm" ''
exec ${pyWithLlm}/bin/llm "$@"

View file

@ -2,9 +2,10 @@
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
setuptools,
# deps
click-default-group,
numpy,
openai,
@ -18,11 +19,12 @@
pytest-httpx,
puremagic,
sqlite-utils,
pytestCheckHook,
}:
let
llm = buildPythonPackage rec {
buildPythonPackage rec {
pname = "llm";
version = "0.21";
version = "0.22";
pyproject = true;
build-system = [ setuptools ];
@ -33,7 +35,7 @@ let
owner = "simonw";
repo = "llm";
rev = "refs/tags/${version}";
hash = "sha256-gxmhdczgbcvbWJQTy+gek499C/3jm9WL5vKZmaGVWgU=";
hash = "sha256-l4tFBCIey5cOUvJ8IXLOjslc1zy9MnuiwFFP275S/Bg=";
};
# patches = [ ./001-disable-install-uninstall-commands.patch ];
@ -69,10 +71,6 @@ let
pythonImportsCheck = [ "llm" ];
passthru = {
inherit withPlugins;
};
meta = with lib; {
homepage = "https://github.com/simonw/llm";
description = "Access large language models from the command-line";
@ -84,13 +82,4 @@ let
mccartykim
];
};
};
withPlugins = throw ''
llm.withPlugins was confusing to use and has been removed.
Please migrate to using python3.withPackages(ps: [ ps.llm ]) instead.
See https://nixos.org/manual/nixpkgs/stable/#python.withpackages-function for more usage examples.
'';
in
llm
}