diff --git a/pkgs/development/python-modules/i-pi/default.nix b/pkgs/development/python-modules/i-pi/default.nix index 1cb4cca97b19..8f62f52f6536 100644 --- a/pkgs/development/python-modules/i-pi/default.nix +++ b/pkgs/development/python-modules/i-pi/default.nix @@ -6,9 +6,11 @@ makeWrapper, setuptools, numpy, - pytest, + distutils, + pytestCheckHook, mock, pytest-mock, + pythonAtLeast, }: buildPythonPackage rec { @@ -33,10 +35,12 @@ buildPythonPackage rec { dependencies = [ numpy ]; nativeCheckInputs = [ - pytest + pytestCheckHook mock pytest-mock - ]; + ] ++ lib.optional (pythonAtLeast "3.12") distutils; + + pytestFlagsArray = [ "ipi_tests/unit_tests" ]; postFixup = '' wrapProgram $out/bin/i-pi \