python3Packages.llm-video-frames: init at 0.1

This commit is contained in:
Philip Taron
2025-05-31 20:22:53 -07:00
parent b271e2cad2
commit 9c246b23ed
4 changed files with 69 additions and 1 deletions
+4 -1
View File
@@ -15,6 +15,7 @@
enable-llm-openai-plugin ? false,
enable-llm-openrouter ? false,
enable-llm-venice ? false,
enable-llm-video-frames ? false,
}:
let
@@ -35,6 +36,7 @@ let
llm-openai-plugin
llm-openrouter
llm-venice
llm-video-frames
;
in
@@ -55,6 +57,7 @@ toPythonApplication (
++ lib.optionals enable-llm-ollama [ llm-ollama ]
++ lib.optionals enable-llm-openai-plugin [ llm-openai-plugin ]
++ lib.optionals enable-llm-openrouter [ llm-openrouter ]
++ lib.optionals enable-llm-venice [ llm-venice ];
++ lib.optionals enable-llm-venice [ llm-venice ]
++ lib.optionals enable-llm-video-frames [ llm-video-frames ];
})
)
@@ -0,0 +1,41 @@
{
lib,
callPackage,
buildPythonPackage,
fetchFromGitHub,
setuptools,
llm,
}:
buildPythonPackage rec {
pname = "llm-video-frames";
version = "0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "simonw";
repo = "llm-video-frames";
tag = version;
hash = "sha256-brTyBymoFuvSQzsD/4aWzFGCrh3yEmWbpsUNGKT9dcU=";
};
build-system = [
setuptools
llm
];
dependencies = [ ];
pythonImportsCheck = [ "llm_video_frames" ];
passthru.tests = {
llm-plugin = callPackage ./tests/llm-plugin.nix { };
};
meta = {
description = "LLM plugin to turn a video into individual frames";
homepage = "https://github.com/simonw/llm-video-frames";
changelog = "https://github.com/simonw/llm-video-frames/releases/tag/${version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ philiptaron ];
};
}
@@ -0,0 +1,22 @@
{
runCommand,
python,
yq,
}:
let
venv = python.withPackages (ps: [
ps.llm
ps.llm-video-frames
]);
in
runCommand "llm-video-frames-test-llm-plugin"
{
nativeBuildInputs = [
venv
yq
];
}
''
llm plugins | yq --exit-status 'any(.name == "llm-video-frames")'
touch "$out"
''
+2
View File
@@ -8322,6 +8322,8 @@ self: super: with self; {
llm-venice = callPackage ../development/python-modules/llm-venice { };
llm-video-frames = callPackage ../development/python-modules/llm-video-frames { };
llmx = callPackage ../development/python-modules/llmx { };
llvmlite = callPackage ../development/python-modules/llvmlite {