1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
{
lib,
buildPythonPackage,
aiohttp,
async-timeout,
chacha20poly1305-reuseable,
cryptography,
deepdiff,
fetchFromGitHub,
ifaddr,
miniaudio,
protobuf,
pydantic,
pyfakefs,
pytest-aiohttp,
pytest-asyncio_0,
pytest-httpserver,
pytest-timeout,
pytestCheckHook,
pythonAtLeast,
requests,
setuptools,
srptools,
stdenv,
tabulate,
tinytag,
zeroconf,
}:
buildPythonPackage rec {
pname = "pyatv";
version = "0.16.1";
pyproject = true;
src = fetchFromGitHub {
owner = "postlund";
repo = "pyatv";
tag = "v${version}";
hash = "sha256-b5u9u5CD/1W422rCxHvoyBqT5CuBAh68/EUBzNDcXoE=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail "pytest-runner" ""
'';
pythonRelaxDeps = [
"aiohttp"
"async_timeout"
"bitarray"
"chacha20poly1305-reuseable"
"cryptography"
"ifaddr"
"miniaudio"
"protobuf"
"requests"
"srptools"
"zeroconf"
];
build-system = [ setuptools ];
dependencies = [
aiohttp
async-timeout
chacha20poly1305-reuseable
cryptography
ifaddr
miniaudio
protobuf
pydantic
requests
srptools
tabulate
tinytag
zeroconf
];
nativeCheckInputs = [
deepdiff
pyfakefs
(pytest-aiohttp.override { pytest-asyncio = pytest-asyncio_0; })
pytest-asyncio_0
pytest-httpserver
pytest-timeout
pytestCheckHook
];
disabledTests =
lib.optionals (pythonAtLeast "3.12") [
# https://github.com/postlund/pyatv/issues/2365
"test_simple_dispatch"
]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
# tests/protocols/raop/test_raop_functional.py::test_stream_retransmission[raop_properties2-2-True] - assert False
"test_stream_retransmission"
];
disabledTestPaths = [
# Test doesn't work in the sandbox
"tests/protocols/companion/test_companion_auth.py"
"tests/protocols/mrp/test_mrp_auth.py"
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "pyatv" ];
meta = {
description = "Python client library for the Apple TV";
homepage = "https://github.com/postlund/pyatv";
changelog = "https://github.com/postlund/pyatv/blob/${src.tag}/CHANGES.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|