ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / pyatv / default.nix
blob644c346e4b0c82b54ebc0357828779c451b40aca
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-timeout
16 , pytestCheckHook
17 , pythonOlder
18 , requests
19 , srptools
20 , zeroconf
23 buildPythonPackage rec {
24   pname = "pyatv";
25   version = "0.10.3";
26   format = "setuptools";
28   disabled = pythonOlder "3.6";
30   src = fetchFromGitHub {
31     owner = "postlund";
32     repo = pname;
33     rev = "v${version}";
34     sha256 = "sha256-ng5KfW93p2/N2a6lnGbRJC6aWOQgTl0imBLdUIUlDic=";
35   };
37   postPatch = ''
38     substituteInPlace setup.py \
39       --replace "pytest-runner" ""
40     # Remove all version pinning
42     substituteInPlace base_versions.txt \
43       --replace "protobuf==3.19.1,<4" "protobuf>=3.19.0,<4"
44   '';
46   propagatedBuildInputs = [
47     aiohttp
48     bitarray
49     chacha20poly1305-reuseable
50     cryptography
51     mediafile
52     miniaudio
53     netifaces
54     protobuf
55     requests
56     srptools
57     zeroconf
58   ];
60   checkInputs = [
61     deepdiff
62     pytest-aiohttp
63     pytest-asyncio
64     pytest-timeout
65     pytestCheckHook
66   ];
68   pytestFlagsArray = [
69     "--asyncio-mode=legacy"
70   ];
72   disabledTestPaths = [
73     # Test doesn't work in the sandbox
74     "tests/protocols/companion/test_companion_auth.py"
75   ];
77   __darwinAllowLocalNetworking = true;
79   pythonImportsCheck = [
80     "pyatv"
81   ];
83   meta = with lib; {
84     description = "Python client library for the Apple TV";
85     homepage = "https://github.com/postlund/pyatv";
86     license = licenses.mit;
87     maintainers = with maintainers; [ ];
88   };