tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python312Packages.llm-gguf: add tests
Joshua Peek
1 year ago
09e55516
739e026b
+27
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
llm-gguf
default.nix
tests
llm-plugin.nix
+5
pkgs/development/python-modules/llm-gguf/default.nix
reviewed
···
1
1
{
2
2
lib,
3
3
+
callPackage,
3
4
buildPythonPackage,
4
5
fetchFromGitHub,
5
6
···
38
39
39
40
# Tests require internet access (downloading models)
40
41
doCheck = false;
42
42
+
43
43
+
passthru.tests = {
44
44
+
llm-plugin = callPackage ./tests/llm-plugin.nix { };
45
45
+
};
41
46
42
47
meta = {
43
48
description = "Run models distributed as GGUF files using LLM";
+22
pkgs/development/python-modules/llm-gguf/tests/llm-plugin.nix
reviewed
···
1
1
+
{
2
2
+
runCommand,
3
3
+
python,
4
4
+
yq,
5
5
+
}:
6
6
+
let
7
7
+
venv = python.withPackages (ps: [
8
8
+
ps.llm
9
9
+
ps.llm-gguf
10
10
+
]);
11
11
+
in
12
12
+
runCommand "llm-gguf-test-llm-plugin"
13
13
+
{
14
14
+
nativeBuildInputs = [
15
15
+
venv
16
16
+
yq
17
17
+
];
18
18
+
}
19
19
+
''
20
20
+
llm plugins | yq --exit-status 'any(.name == "llm-gguf")'
21
21
+
touch "$out"
22
22
+
''