diff --git a/pkgs/development/python-modules/niapy/default.nix b/pkgs/development/python-modules/niapy/default.nix index 2d17315de54b..e3c74fb03d05 100644 --- a/pkgs/development/python-modules/niapy/default.nix +++ b/pkgs/development/python-modules/niapy/default.nix @@ -6,24 +6,31 @@ numpy, openpyxl, pandas, - poetry-core, - pytestCheckHook, pytest-xdist, + pytestCheckHook, + uv-build, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "niapy"; - version = "2.6.1"; + version = "2.7.1"; pyproject = true; src = fetchFromGitHub { owner = "NiaOrg"; repo = "NiaPy"; - tag = "v${version}"; - hash = "sha256-5Cxxug/FyucU+MkWXMtH43AembfZ/kj5r8nId5664z8="; + tag = "v${finalAttrs.version}"; + hash = "sha256-g3B/jknzMIYP8VJayPktnYwq2WVA2KaCRS/ZzVwc88Q="; }; - build-system = [ poetry-core ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "uv_build>=0.9.17,<0.10.0" "uv_build" + ''; + + pythonRelaxDeps = [ "numpy" ]; + + build-system = [ uv-build ]; dependencies = [ matplotlib @@ -32,10 +39,6 @@ buildPythonPackage rec { pandas ]; - pythonRelaxDeps = [ - "numpy" - ]; - nativeCheckInputs = [ pytestCheckHook pytest-xdist @@ -46,8 +49,8 @@ buildPythonPackage rec { meta = { description = "Micro framework for building nature-inspired algorithms"; homepage = "https://niapy.org/"; - changelog = "https://github.com/NiaOrg/NiaPy/releases/tag/${src.tag}"; + changelog = "https://github.com/NiaOrg/NiaPy/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; }; -} +})