/ .devops / nix / package-gguf-py.nix
package-gguf-py.nix
 1  {
 2    lib,
 3    llamaVersion,
 4    numpy,
 5    tqdm,
 6    sentencepiece,
 7    pyyaml,
 8    poetry-core,
 9    buildPythonPackage,
10    pytestCheckHook,
11  }:
12  
13  buildPythonPackage {
14    pname = "gguf";
15    version = llamaVersion;
16    pyproject = true;
17    nativeBuildInputs = [ poetry-core ];
18    propagatedBuildInputs = [
19      numpy
20      tqdm
21      sentencepiece
22      pyyaml
23    ];
24    src = lib.cleanSource ../../gguf-py;
25    pythonImportsCheck = [
26      "numpy"
27      "gguf"
28    ];
29    nativeCheckInputs = [ pytestCheckHook ];
30    doCheck = true;
31    meta = with lib; {
32      description = "Python package for writing binary files in the GGUF format";
33      license = licenses.mit;
34      maintainers = [ maintainers.ditsuke ];
35    };
36  }