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