diff --git a/pkgs/development/python-modules/simanneal/default.nix b/pkgs/development/python-modules/simanneal/default.nix index ebface191aaf..2cdbf44c10d5 100644 --- a/pkgs/development/python-modules/simanneal/default.nix +++ b/pkgs/development/python-modules/simanneal/default.nix @@ -2,23 +2,29 @@ lib, fetchFromGitHub, buildPythonPackage, - pytest, + setuptools, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "simanneal"; version = "0.5.0"; - format = "setuptools"; + pyproject = true; + + __structuredAttrs = true; src = fetchFromGitHub { owner = "perrygeo"; repo = "simanneal"; - rev = version; + tag = finalAttrs.version; hash = "sha256-yKZHkrf6fM0WsHczIEK5Kxusz5dSBgydK3fLu1nDyvk="; }; - nativeCheckInputs = [ pytest ]; - checkPhase = "pytest tests"; + build-system = [ setuptools ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "simanneal" ]; meta = { description = "Python implementation of the simulated annealing optimization technique"; @@ -26,4 +32,4 @@ buildPythonPackage rec { license = lib.licenses.isc; maintainers = with lib.maintainers; [ veprbl ]; }; -} +})