at master 1.3 kB view raw
1{ 2 lib, 3 anyio, 4 buildPythonPackage, 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.26.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.10"; 24 25 src = fetchFromGitHub { 26 owner = "dry-python"; 27 repo = "returns"; 28 tag = version; 29 hash = "sha256-VQzsa/uNTQVND0kc20d25to/6LELEiS3cqvG7a1kDw4="; 30 }; 31 32 postPatch = '' 33 sed -i setup.cfg \ 34 -e '/--cov.*/d' \ 35 -e '/--mypy.*/d' 36 ''; 37 38 nativeBuildInputs = [ poetry-core ]; 39 40 propagatedBuildInputs = [ typing-extensions ]; 41 42 nativeCheckInputs = [ 43 anyio 44 httpx 45 hypothesis 46 pytestCheckHook 47 pytest-aio 48 pytest-subtests 49 setuptools 50 trio 51 ]; 52 53 preCheck = '' 54 rm -rf returns/contrib/mypy 55 ''; 56 57 pythonImportsCheck = [ "returns" ]; 58 59 disabledTestPaths = [ "typesafety" ]; 60 61 meta = with lib; { 62 description = "Make your functions return something meaningful, typed, and safe"; 63 homepage = "https://github.com/dry-python/returns"; 64 changelog = "https://github.com/dry-python/returns/blob/${src.tag}/CHANGELOG.md"; 65 license = licenses.bsd2; 66 maintainers = with maintainers; [ jessemoore ]; 67 }; 68}