build(nix): Enable pytestCheckHook and pythonImportsCheck for gguf-py
This commit is contained in:
parent
11e581b45d
commit
4b124fb2a4
2 changed files with 16 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
numpy,
|
||||
poetry-core,
|
||||
buildPythonPackage,
|
||||
pytestCheckHook,
|
||||
}@inputs:
|
||||
|
||||
buildPythonPackage {
|
||||
|
@ -13,7 +14,12 @@ buildPythonPackage {
|
|||
nativeBuildInputs = [ poetry-core ];
|
||||
propagatedBuildInputs = [ numpy ];
|
||||
src = lib.cleanSource ../../gguf-py;
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [
|
||||
"numpy"
|
||||
"gguf"
|
||||
];
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
doCheck = true;
|
||||
meta = with lib; {
|
||||
description = "Python package for writing binary files in the GGUF format";
|
||||
license = licenses.mit;
|
||||
|
|
|
@ -10,6 +10,7 @@ let
|
|||
buildPythonPackage = pythonPackages.buildPythonPackage;
|
||||
numpy = pythonPackages.numpy;
|
||||
poetry-core = pythonPackages.poetry-core;
|
||||
pytestCheckHook = pythonPackages.pytestCheckHook;
|
||||
in
|
||||
|
||||
# We're using `makeScope` instead of just writing out an attrset
|
||||
|
@ -19,7 +20,14 @@ in
|
|||
lib.makeScope newScope (self: {
|
||||
inherit llamaVersion;
|
||||
pp = python3.pkgs;
|
||||
gguf-py = self.callPackage ./package-gguf-py.nix { inherit buildPythonPackage numpy poetry-core; };
|
||||
gguf-py = self.callPackage ./package-gguf-py.nix {
|
||||
inherit
|
||||
buildPythonPackage
|
||||
numpy
|
||||
poetry-core
|
||||
pytestCheckHook
|
||||
;
|
||||
};
|
||||
llama-cpp = self.callPackage ./package.nix { };
|
||||
docker = self.callPackage ./docker.nix { };
|
||||
docker-min = self.callPackage ./docker.nix { interactive = false; };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue