diff --git a/pkgs/development/python-modules/returns/default.nix b/pkgs/development/python-modules/returns/default.nix index d12e4ccf1f5e..0b54d62ba569 100644 --- a/pkgs/development/python-modules/returns/default.nix +++ b/pkgs/development/python-modules/returns/default.nix @@ -1,14 +1,15 @@ { lib , anyio -, curio , buildPythonPackage +, curio , fetchFromGitHub , httpx , hypothesis , poetry-core -, pytestCheckHook , pytest-aio , pytest-subtests +, pytestCheckHook +, pythonOlder , setuptools , trio , typing-extensions @@ -16,14 +17,16 @@ buildPythonPackage rec { pname = "returns"; - version = "0.20.0"; + version = "0.21.0"; format = "pyproject"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "dry-python"; repo = "returns"; rev = "refs/tags/${version}"; - hash = "sha256-28WYjrjmu3hQ8+Snuvl3ykTd86eWYI97AE60p6SVwDQ="; + hash = "sha256-oYOCoh/pF2g4KGWC2mEnFD+zm2CKL+3x5JjzuZ3QHVQ="; }; postPatch = '' @@ -40,10 +43,6 @@ buildPythonPackage rec { typing-extensions ]; - preCheck = '' - rm -rf returns/contrib/mypy - ''; - nativeCheckInputs = [ anyio curio @@ -56,12 +55,23 @@ buildPythonPackage rec { trio ]; - pytestFlagsArray = [ "--ignore=typesafety" ]; + preCheck = '' + rm -rf returns/contrib/mypy + ''; + + pythonImportsCheck = [ + "returns" + ]; + + pytestFlagsArray = [ + "--ignore=typesafety" + ]; meta = with lib; { description = "Make your functions return something meaningful, typed, and safe!"; homepage = "https://github.com/dry-python/returns"; + changelog = "https://github.com/dry-python/returns/blob/${version}/CHANGELOG.md"; license = licenses.bsd2; - maintainers = [ maintainers.jessemoore ]; + maintainers = with maintainers; [ jessemoore ]; }; }