llm-jq: init at 0.1.1 (#386438)
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
callPackage,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
llm,
|
||||
nix-update-script,
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "llm-jq";
|
||||
version = "0.1.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simonw";
|
||||
repo = "llm-jq";
|
||||
tag = version;
|
||||
hash = "sha256-Mf/tbB9+UdmSRpulqv5Wagr8wjDcRrNs2741DNQZhO4=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
llm
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "llm_jq" ];
|
||||
|
||||
passthru.tests = {
|
||||
llm-plugin = callPackage ./tests/llm-plugin.nix { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Write and execute jq programs with the help of LLM";
|
||||
homepage = "https://github.com/simonw/llm-jq";
|
||||
changelog = "https://github.com/simonw/llm-jq/releases/tag/${version}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ josh ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
runCommand,
|
||||
python,
|
||||
yq,
|
||||
}:
|
||||
let
|
||||
venv = python.withPackages (ps: [
|
||||
ps.llm
|
||||
ps.llm-jq
|
||||
]);
|
||||
in
|
||||
runCommand "llm-jq-test-llm-plugin"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
venv
|
||||
yq
|
||||
];
|
||||
}
|
||||
''
|
||||
llm plugins | yq --exit-status 'any(.name == "llm-jq")'
|
||||
llm jq --help
|
||||
touch "$out"
|
||||
''
|
||||
@@ -7759,6 +7759,8 @@ self: super: with self; {
|
||||
|
||||
llm-gguf = callPackage ../development/python-modules/llm-gguf { };
|
||||
|
||||
llm-jq = callPackage ../development/python-modules/llm-jq { };
|
||||
|
||||
llm-ollama = callPackage ../development/python-modules/llm-ollama { };
|
||||
|
||||
llmx = callPackage ../development/python-modules/llmx { };
|
||||
|
||||
Reference in New Issue
Block a user