diff --git a/pkgs/development/python-modules/slh-dsa/default.nix b/pkgs/development/python-modules/slh-dsa/default.nix index e6da84504c60..b28d4d02b8cb 100644 --- a/pkgs/development/python-modules/slh-dsa/default.nix +++ b/pkgs/development/python-modules/slh-dsa/default.nix @@ -2,7 +2,10 @@ lib, buildPythonPackage, fetchPypi, - pdm-backend, + setuptools, + mypy, + pytestCheckHook, + pytest-xdist, }: buildPythonPackage rec { @@ -16,10 +19,25 @@ buildPythonPackage rec { hash = "sha256-p4eWMVayOFiEjFtlnsmmtH6HMfcIeYIpgdfjuB4mmAY="; }; - build-system = [ pdm-backend ]; + env.SLHDSA_BUILD_OPTIMIZED = "1"; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail '"mypy>=1.10.1",' "" + ''; + + build-system = [ + setuptools + mypy + ]; pythonImportsCheck = [ "slhdsa" ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-xdist + ]; + meta = { description = "Pure Python implementation of the SLH-DSA algorithm"; homepage = "https://github.com/colinxu2020/slhdsa";