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