From fbca1d01f0ba115b8ad86e50946b44795d8e0858 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 3 Jul 2026 02:11:54 +0700 Subject: [PATCH 1/3] python3Packages.simanneal: migrate to pyproject --- pkgs/development/python-modules/simanneal/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/simanneal/default.nix b/pkgs/development/python-modules/simanneal/default.nix index ebface191aaf..c12584a3d02f 100644 --- a/pkgs/development/python-modules/simanneal/default.nix +++ b/pkgs/development/python-modules/simanneal/default.nix @@ -2,13 +2,14 @@ lib, fetchFromGitHub, buildPythonPackage, + setuptools, pytest, }: buildPythonPackage rec { pname = "simanneal"; version = "0.5.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "perrygeo"; @@ -17,6 +18,8 @@ buildPythonPackage rec { hash = "sha256-yKZHkrf6fM0WsHczIEK5Kxusz5dSBgydK3fLu1nDyvk="; }; + build-system = [ setuptools ]; + nativeCheckInputs = [ pytest ]; checkPhase = "pytest tests"; From eaa544a9f93bbc1433ce230d83cb41d452ef9fe3 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 3 Jul 2026 02:16:03 +0700 Subject: [PATCH 2/3] python3Packages.simanneal: modernize --- pkgs/development/python-modules/simanneal/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/simanneal/default.nix b/pkgs/development/python-modules/simanneal/default.nix index c12584a3d02f..ff553295916a 100644 --- a/pkgs/development/python-modules/simanneal/default.nix +++ b/pkgs/development/python-modules/simanneal/default.nix @@ -6,15 +6,17 @@ pytest, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "simanneal"; version = "0.5.0"; pyproject = true; + __structuredAttrs = true; + src = fetchFromGitHub { owner = "perrygeo"; repo = "simanneal"; - rev = version; + tag = finalAttrs.version; hash = "sha256-yKZHkrf6fM0WsHczIEK5Kxusz5dSBgydK3fLu1nDyvk="; }; @@ -23,10 +25,12 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest ]; checkPhase = "pytest tests"; + pythonImportsCheck = [ "simanneal" ]; + meta = { description = "Python implementation of the simulated annealing optimization technique"; homepage = "https://github.com/perrygeo/simanneal"; license = lib.licenses.isc; maintainers = with lib.maintainers; [ veprbl ]; }; -} +}) From c69eb2e658d4858160e56832443c8ce1a43ed0c2 Mon Sep 17 00:00:00 2001 From: Harinn Date: Tue, 14 Jul 2026 15:36:13 +0700 Subject: [PATCH 3/3] python3Packages.simanneal: use pytestCheckHook --- pkgs/development/python-modules/simanneal/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/simanneal/default.nix b/pkgs/development/python-modules/simanneal/default.nix index ff553295916a..2cdbf44c10d5 100644 --- a/pkgs/development/python-modules/simanneal/default.nix +++ b/pkgs/development/python-modules/simanneal/default.nix @@ -3,7 +3,7 @@ fetchFromGitHub, buildPythonPackage, setuptools, - pytest, + pytestCheckHook, }: buildPythonPackage (finalAttrs: { @@ -22,8 +22,7 @@ buildPythonPackage (finalAttrs: { build-system = [ setuptools ]; - nativeCheckInputs = [ pytest ]; - checkPhase = "pytest tests"; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "simanneal" ];