add two more plugins for llm

This commit is contained in:
Daylin Morgan 2025-02-06 11:52:45 -06:00
parent 67983ce711
commit 197e5c03bf
Signed by: daylin
GPG key ID: 950D13E9719334AD
3 changed files with 82 additions and 7 deletions

View file

@ -0,0 +1,37 @@
{
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
wheel,
# deps
prompt_toolkit,
pygments,
...
}:
buildPythonPackage rec {
pname = "llm-cmd";
version = "0.2a0";
pyproject = true;
src = fetchFromGitHub {
owner = "simonw";
repo = "llm-cmd";
rev = version;
hash = "sha256-RhwQEllpee/XP1p0nrgL4m+KjSZzf61J8l1jJGlg94E=";
};
nativeBuildInputs = [
setuptools
wheel
];
dependencies = [
prompt_toolkit pygments
];
dontCheckRuntimeDeps = true;
}

View file

@ -0,0 +1,30 @@
{
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
wheel,
...
}:
buildPythonPackage rec {
pname = "llm-jq";
version = "0.1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "simonw";
repo = "llm-jq";
rev = version;
hash = "sha256-Mf/tbB9+UdmSRpulqv5Wagr8wjDcRrNs2741DNQZhO4=";
};
nativeBuildInputs = [
setuptools
wheel
];
dontCheckRuntimeDeps = true;
}

View file

@ -5,15 +5,23 @@
let let
inherit (pkgs) python3Packages; inherit (pkgs) python3Packages;
llm = python3Packages.callPackage ../llm { }; llm = python3Packages.callPackage ../llm { };
llm-anthropic = python3Packages.callPackage ../llm-anthropic { }; plugins = [
llm-gemini = python3Packages.callPackage ../llm-gemini { }; "anthropic"
"gemini"
"cmd"
"jq"
];
pluginPackages = plugins |> map (name: python3Packages.callPackage (../. + "/llm-${name}") { });
pyWithLlm = ( pyWithLlm = (
pkgs.python3.withPackages (_: [ pkgs.python3.withPackages (
_:
[
llm llm
llm-anthropic ]
llm-gemini ++ pluginPackages
]) )
); );
in in
pkgs.writeShellScriptBin "llm" '' pkgs.writeShellScriptBin "llm" ''