diff --git a/pkgs/development/python-modules/keyutils/default.nix b/pkgs/development/python-modules/keyutils/default.nix index 031ae5a65c39..c387c10ebc34 100644 --- a/pkgs/development/python-modules/keyutils/default.nix +++ b/pkgs/development/python-modules/keyutils/default.nix @@ -1,4 +1,10 @@ -{ lib, buildPythonPackage, fetchFromGitHub, keyutils, pytest-runner, pytest }: +{ lib +, buildPythonPackage +, cython +, fetchFromGitHub +, keyutils +, pytestCheckHook +}: buildPythonPackage rec { pname = "keyutils"; @@ -16,8 +22,19 @@ buildPythonPackage rec { substituteInPlace setup.py --replace '"pytest-runner"' "" ''; + preBuild = '' + cython keyutils/_keyutils.pyx + ''; + + preCheck = '' + rm -rf keyutils + ''; + buildInputs = [ keyutils ]; - nativeCheckInputs = [ pytest pytest-runner ]; + nativeBuildInputs = [ cython ]; + nativeCheckInputs = [ + pytestCheckHook + ]; meta = { description = "A set of python bindings for keyutils";