From eaa544a9f93bbc1433ce230d83cb41d452ef9fe3 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 3 Jul 2026 02:16:03 +0700 Subject: [PATCH] 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 ]; }; -} +})