at master 2.4 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 pythonOlder, 6 nix-update-script, 7 8 # build-system 9 poetry-core, 10 poetry-dynamic-versioning, 11 12 # dependencies 13 click, 14 cryptography, 15 dnspython, 16 httpx, 17 libipld, 18 pydantic, 19 typing-extensions, 20 websockets, 21 22 # nativeCheckInputs 23 pytestCheckHook, 24 pytest-asyncio, 25 coverage, 26}: 27 28buildPythonPackage rec { 29 pname = "atproto"; 30 version = "0.0.62"; 31 format = "pyproject"; 32 disabled = pythonOlder "3.8"; 33 34 # use GitHub, pypi does not include tests 35 src = fetchFromGitHub { 36 owner = "MarshalX"; 37 repo = "atproto"; 38 tag = "v${version}"; 39 hash = "sha256-T1Jdg62fSV+5qC486Agsuk6qrDhGSNHq75uvOyvOwpA="; 40 }; 41 42 POETRY_DYNAMIC_VERSIONING_BYPASS = version; 43 44 build-system = [ 45 poetry-core 46 poetry-dynamic-versioning 47 ]; 48 49 dependencies = [ 50 click 51 cryptography 52 dnspython 53 httpx 54 libipld 55 pydantic 56 typing-extensions 57 websockets 58 ]; 59 60 pythonRelaxDeps = [ 61 "websockets" 62 ]; 63 64 nativeCheckInputs = [ 65 pytestCheckHook 66 pytest-asyncio 67 coverage 68 ]; 69 70 disabledTestPaths = [ 71 # the required `_PATH_TO_LEXICONS` is outside the package tree 72 "tests/test_atproto_lexicon/test_lexicon_parser.py" 73 # touches network 74 "tests/test_atproto_identity/test_atproto_data.py" 75 "tests/test_atproto_identity/test_async_atproto_data.py" 76 "tests/test_atproto_identity/test_did_resolver.py" 77 "tests/test_atproto_identity/test_async_did_resolver.py" 78 "tests/test_atproto_identity/test_did_resolver_cache.py" 79 "tests/test_atproto_identity/test_async_did_resolver_cache.py" 80 "tests/test_atproto_identity/test_handle_resolver.py" 81 "tests/test_atproto_identity/test_async_handle_resolver.py" 82 "tests/test_atproto_server/auth/test_custom_feed_auth.py" 83 ]; 84 85 pythonImportsCheck = [ 86 "atproto" 87 "atproto_cli" 88 "atproto_client" 89 "atproto_codegen" 90 "atproto_core" 91 "atproto_crypto" 92 "atproto_firehose" 93 "atproto_identity" 94 "atproto_lexicon" 95 "atproto_server" 96 ]; 97 98 passthru.updateScript = nix-update-script { }; 99 100 meta = { 101 description = "AT Protocol (Bluesky) SDK for Python"; 102 homepage = "https://github.com/MarshalX/atproto"; 103 changelog = "https://github.com/MarshalX/atproto/blob/v${version}/CHANGES.md"; 104 license = lib.licenses.mit; 105 maintainers = with lib.maintainers; [ vji ]; 106 }; 107}