Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at lanzaboote 115 lines 2.2 kB view raw
1{ lib 2, buildPythonPackage 3, aiohttp 4, bitarray 5, chacha20poly1305-reuseable 6, cryptography 7, deepdiff 8, fetchFromGitHub 9, mediafile 10, miniaudio 11, netifaces 12, protobuf 13, pytest-aiohttp 14, pytest-asyncio 15, pytest-httpserver 16, pytest-timeout 17, pytestCheckHook 18, pythonRelaxDepsHook 19, pythonOlder 20, requests 21, srptools 22, stdenv 23, zeroconf 24}: 25 26buildPythonPackage rec { 27 pname = "pyatv"; 28 version = "0.13.4"; 29 format = "setuptools"; 30 31 disabled = pythonOlder "3.7"; 32 33 src = fetchFromGitHub { 34 owner = "postlund"; 35 repo = pname; 36 rev = "refs/tags/v${version}"; 37 hash = "sha256-rZnL18vO8eYn70GzeKSY528iTc0r/seGv0dYDYGHNzw="; 38 }; 39 40 postPatch = '' 41 substituteInPlace setup.py \ 42 --replace "pytest-runner" "" 43 ''; 44 45 pythonRelaxDeps = [ 46 "aiohttp" 47 "async_timeout" 48 "bitarray" 49 "chacha20poly1305-reuseable" 50 "cryptography" 51 "ifaddr" 52 "mediafile" 53 "miniaudio" 54 "protobuf" 55 "requests" 56 "srptools" 57 "zeroconf" 58 ]; 59 60 nativeBuildInputs = [ 61 pythonRelaxDepsHook 62 ]; 63 64 propagatedBuildInputs = [ 65 aiohttp 66 bitarray 67 chacha20poly1305-reuseable 68 cryptography 69 mediafile 70 miniaudio 71 netifaces 72 protobuf 73 requests 74 srptools 75 zeroconf 76 ]; 77 78 nativeCheckInputs = [ 79 deepdiff 80 pytest-aiohttp 81 pytest-asyncio 82 pytest-httpserver 83 pytest-timeout 84 pytestCheckHook 85 ]; 86 87 pytestFlagsArray = [ 88 "--asyncio-mode=legacy" 89 ]; 90 91 disabledTests = lib.optionals (stdenv.isDarwin) [ 92 # tests/protocols/raop/test_raop_functional.py::test_stream_retransmission[raop_properties2-2-True] - assert False 93 "test_stream_retransmission" 94 ]; 95 96 disabledTestPaths = [ 97 # Test doesn't work in the sandbox 98 "tests/protocols/companion/test_companion_auth.py" 99 "tests/protocols/mrp/test_mrp_auth.py" 100 ]; 101 102 __darwinAllowLocalNetworking = true; 103 104 pythonImportsCheck = [ 105 "pyatv" 106 ]; 107 108 meta = with lib; { 109 description = "Python client library for the Apple TV"; 110 homepage = "https://github.com/postlund/pyatv"; 111 changelog = "https://github.com/postlund/pyatv/blob/v${version}/CHANGES.md"; 112 license = licenses.mit; 113 maintainers = with maintainers; [ fab ]; 114 }; 115}