diff --git a/pkgs/development/python-modules/pyprecice/default.nix b/pkgs/development/python-modules/pyprecice/default.nix index c005eaaa23d3..48bf841129f8 100644 --- a/pkgs/development/python-modules/pyprecice/default.nix +++ b/pkgs/development/python-modules/pyprecice/default.nix @@ -1,15 +1,18 @@ { lib, buildPythonPackage, - setuptools, - pip, - cython, fetchFromGitHub, + + # build-system + cython, + pip, + pkgconfig, + setuptools, + + # dependencies mpi4py, numpy, precice, - pkgconfig, - pythonOlder, }: buildPythonPackage rec { @@ -17,8 +20,6 @@ buildPythonPackage rec { version = "3.1.2"; pyproject = true; - disabled = pythonOlder "3.7"; - src = fetchFromGitHub { owner = "precice"; repo = "python-bindings"; @@ -26,14 +27,24 @@ buildPythonPackage rec { hash = "sha256-/atuMJVgvY4kgvrB+LuQZmJuSK4O8TJdguC7NCiRS2Y="; }; - nativeBuildInputs = [ - setuptools - pip + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "setuptools>=61,<72" "setuptools" \ + --replace-fail "numpy<2" "numpy" + ''; + + build-system = [ cython + pip pkgconfig + setuptools ]; - propagatedBuildInputs = [ + pythonRelaxDeps = [ + "numpy" + ]; + + dependencies = [ numpy mpi4py precice @@ -44,10 +55,11 @@ buildPythonPackage rec { # Do not use pythonImportsCheck because this will also initialize mpi which requires a network interface - meta = with lib; { + meta = { description = "Python language bindings for preCICE"; homepage = "https://github.com/precice/python-bindings"; - license = licenses.lgpl3Only; - maintainers = with maintainers; [ Scriptkiddi ]; + changelog = "https://github.com/precice/python-bindings/blob/v${version}/CHANGELOG.md"; + license = lib.licenses.lgpl3Only; + maintainers = with lib.maintainers; [ Scriptkiddi ]; }; }