Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyatv / default.nix
blobb5785dfd3f2e369115430428aa10698b38cb44ca
1 { lib
2 , buildPythonPackage
3 , aiohttp
4 , async-timeout
5 , chacha20poly1305-reuseable
6 , cryptography
7 , deepdiff
8 , fetchFromGitHub
9 , ifaddr
10 , mediafile
11 , miniaudio
12 , protobuf
13 , pydantic
14 , pyfakefs
15 , pytest-aiohttp
16 , pytest-asyncio
17 , pytest-httpserver
18 , pytest-timeout
19 , pytestCheckHook
20 , pythonRelaxDepsHook
21 , pythonOlder
22 , requests
23 , setuptools
24 , srptools
25 , stdenv
26 , tabulate
27 , zeroconf
30 buildPythonPackage rec {
31   pname = "pyatv";
32   version = "0.14.4";
33   pyproject = true;
35   disabled = pythonOlder "3.8";
37   src = fetchFromGitHub {
38     owner = "postlund";
39     repo = "pyatv";
40     rev = "refs/tags/v${version}";
41     hash = "sha256-w3WOlZFfuCmekUsr8msi2LXTm6j8/Bk49L3MiYF7lOM=";
42   };
44   postPatch = ''
45     substituteInPlace setup.py \
46       --replace "pytest-runner" ""
47   '';
49   pythonRelaxDeps = [
50     "aiohttp"
51     "async_timeout"
52     "bitarray"
53     "chacha20poly1305-reuseable"
54     "cryptography"
55     "ifaddr"
56     "mediafile"
57     "miniaudio"
58     "protobuf"
59     "requests"
60     "srptools"
61     "zeroconf"
62   ];
64   nativeBuildInputs = [
65     pythonRelaxDepsHook
66     setuptools
67   ];
69   propagatedBuildInputs = [
70     aiohttp
71     async-timeout
72     chacha20poly1305-reuseable
73     cryptography
74     ifaddr
75     mediafile
76     miniaudio
77     protobuf
78     pydantic
79     requests
80     srptools
81     tabulate
82     zeroconf
83   ];
85   nativeCheckInputs = [
86     deepdiff
87     pyfakefs
88     pytest-aiohttp
89     pytest-asyncio
90     pytest-httpserver
91     pytest-timeout
92     pytestCheckHook
93   ];
95   disabledTests = lib.optionals (stdenv.isDarwin) [
96     # tests/protocols/raop/test_raop_functional.py::test_stream_retransmission[raop_properties2-2-True] - assert False
97     "test_stream_retransmission"
98   ];
100   disabledTestPaths = [
101     # Test doesn't work in the sandbox
102     "tests/protocols/companion/test_companion_auth.py"
103     "tests/protocols/mrp/test_mrp_auth.py"
104   ];
106   __darwinAllowLocalNetworking = true;
108   pythonImportsCheck = [
109     "pyatv"
110   ];
112   meta = with lib; {
113     description = "Python client library for the Apple TV";
114     homepage = "https://github.com/postlund/pyatv";
115     changelog = "https://github.com/postlund/pyatv/blob/v${version}/CHANGES.md";
116     license = licenses.mit;
117     maintainers = with maintainers; [ fab ];
118   };