at 24.05-pre 1.4 kB view raw
1{ lib 2, anyio 3, buildPythonPackage 4, curio 5, fetchFromGitHub 6, httpx 7, hypothesis 8, poetry-core 9, pytest-aio 10, pytest-subtests 11, pytestCheckHook 12, pythonOlder 13, setuptools 14, trio 15, typing-extensions 16}: 17 18buildPythonPackage rec { 19 pname = "returns"; 20 version = "0.22.0"; 21 format = "pyproject"; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchFromGitHub { 26 owner = "dry-python"; 27 repo = "returns"; 28 rev = "refs/tags/${version}"; 29 hash = "sha256-0eFirhBsj8SWfoAPWEMuFa+EvBgHKpNeKVj3qJ4L6hE="; 30 }; 31 32 postPatch = '' 33 sed -i setup.cfg \ 34 -e '/--cov.*/d' \ 35 -e '/--mypy.*/d' 36 ''; 37 38 nativeBuildInputs = [ 39 poetry-core 40 ]; 41 42 propagatedBuildInputs = [ 43 typing-extensions 44 ]; 45 46 nativeCheckInputs = [ 47 anyio 48 curio 49 httpx 50 hypothesis 51 pytestCheckHook 52 pytest-aio 53 pytest-subtests 54 setuptools 55 trio 56 ]; 57 58 preCheck = '' 59 rm -rf returns/contrib/mypy 60 ''; 61 62 pythonImportsCheck = [ 63 "returns" 64 ]; 65 66 pytestFlagsArray = [ 67 "--ignore=typesafety" 68 ]; 69 70 meta = with lib; { 71 description = "Make your functions return something meaningful, typed, and safe!"; 72 homepage = "https://github.com/dry-python/returns"; 73 changelog = "https://github.com/dry-python/returns/blob/${version}/CHANGELOG.md"; 74 license = licenses.bsd2; 75 maintainers = with maintainers; [ jessemoore ]; 76 }; 77}