diff --git a/pkgs/development/python-modules/transaction/default.nix b/pkgs/development/python-modules/transaction/default.nix index 2b3e0515894a..35c19daedc08 100644 --- a/pkgs/development/python-modules/transaction/default.nix +++ b/pkgs/development/python-modules/transaction/default.nix @@ -1,36 +1,51 @@ { lib, - fetchPypi, + fetchFromGitHub, buildPythonPackage, + setuptools, zope-interface, - mock, + pytestCheckHook, pythonOlder, }: buildPythonPackage rec { pname = "transaction"; - version = "4.0"; - format = "setuptools"; + version = "5.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-aANduRP2DRvhL2Vj0gHaqzbIPnY94ViZ/4M48m5eYvI="; + src = fetchFromGitHub { + owner = "zopefoundation"; + repo = "transaction"; + rev = "refs/tags/${version}"; + hash = "sha256-8yvA2dvB69+EqsAa+hc93rgg6D64lcajl6JgFabhjwY="; }; - propagatedBuildInputs = [ + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "setuptools<74" "setuptools" + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ zope-interface - mock + ]; + + nativeCheckInputs = [ + pytestCheckHook ]; pythonImportsCheck = [ "transaction" ]; - meta = with lib; { + meta = { description = "Transaction management"; homepage = "https://transaction.readthedocs.io/"; changelog = "https://github.com/zopefoundation/transaction/blob/${version}/CHANGES.rst"; - license = licenses.zpl20; - maintainers = [ ]; + license = lib.licenses.zpl21; + maintainers = with lib.maintainers; [ nickcao ]; }; }