2021-03-16 21:37:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-05-27 18:24:11 +00:00
|
|
|
, aiohttp
|
2021-06-20 15:07:12 +00:00
|
|
|
, bitarray
|
2022-07-06 20:15:58 +00:00
|
|
|
, chacha20poly1305-reuseable
|
2020-05-27 18:24:11 +00:00
|
|
|
, cryptography
|
|
|
|
, deepdiff
|
2021-03-16 21:37:12 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-10 19:01:29 +00:00
|
|
|
, mediafile
|
2021-06-20 15:07:12 +00:00
|
|
|
, miniaudio
|
2020-05-27 18:24:11 +00:00
|
|
|
, netifaces
|
|
|
|
, protobuf
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
2021-03-16 21:37:12 +00:00
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
2021-10-25 14:39:59 +00:00
|
|
|
, pythonOlder
|
2022-02-02 19:56:52 +00:00
|
|
|
, requests
|
2020-05-27 18:24:11 +00:00
|
|
|
, srptools
|
2020-10-14 11:36:03 +00:00
|
|
|
, zeroconf
|
2020-05-27 18:24:11 +00:00
|
|
|
}:
|
2018-11-22 22:16:50 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyatv";
|
2022-08-03 16:02:08 +00:00
|
|
|
version = "0.10.3";
|
2021-10-25 14:39:59 +00:00
|
|
|
format = "setuptools";
|
2021-11-25 10:15:49 +00:00
|
|
|
|
2021-10-25 14:39:59 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2021-03-16 21:37:12 +00:00
|
|
|
|
2020-10-14 11:36:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "postlund";
|
|
|
|
repo = pname;
|
2020-10-14 11:36:03 +00:00
|
|
|
rev = "v${version}";
|
2022-08-03 16:02:08 +00:00
|
|
|
sha256 = "sha256-ng5KfW93p2/N2a6lnGbRJC6aWOQgTl0imBLdUIUlDic=";
|
2018-11-22 22:16:50 +00:00
|
|
|
};
|
|
|
|
|
2022-02-02 19:56:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" ""
|
|
|
|
# Remove all version pinning
|
|
|
|
|
|
|
|
substituteInPlace base_versions.txt \
|
|
|
|
--replace "protobuf==3.19.1,<4" "protobuf>=3.19.0,<4"
|
|
|
|
'';
|
|
|
|
|
2020-05-27 18:24:11 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2021-06-20 15:07:12 +00:00
|
|
|
bitarray
|
2022-07-06 20:15:58 +00:00
|
|
|
chacha20poly1305-reuseable
|
2020-05-27 18:24:11 +00:00
|
|
|
cryptography
|
2021-10-10 19:01:29 +00:00
|
|
|
mediafile
|
2021-06-20 15:07:12 +00:00
|
|
|
miniaudio
|
2020-05-27 18:24:11 +00:00
|
|
|
netifaces
|
2021-03-16 21:37:12 +00:00
|
|
|
protobuf
|
2022-02-02 19:56:52 +00:00
|
|
|
requests
|
2021-03-16 21:37:12 +00:00
|
|
|
srptools
|
2020-10-14 11:36:03 +00:00
|
|
|
zeroconf
|
2020-05-27 18:24:11 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
deepdiff
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
2021-03-16 21:37:12 +00:00
|
|
|
pytest-timeout
|
2020-10-14 11:36:03 +00:00
|
|
|
pytestCheckHook
|
2020-05-27 18:24:11 +00:00
|
|
|
];
|
|
|
|
|
2022-07-21 11:50:50 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--asyncio-mode=legacy"
|
|
|
|
];
|
|
|
|
|
2021-11-25 10:15:49 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Test doesn't work in the sandbox
|
|
|
|
"tests/protocols/companion/test_companion_auth.py"
|
|
|
|
];
|
|
|
|
|
2021-01-05 23:15:04 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-10-25 14:39:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyatv"
|
|
|
|
];
|
2021-03-16 21:37:12 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-03-16 21:37:12 +00:00
|
|
|
description = "Python client library for the Apple TV";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/postlund/pyatv";
|
2018-11-22 22:16:50 +00:00
|
|
|
license = licenses.mit;
|
2022-07-04 10:41:44 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-11-22 22:16:50 +00:00
|
|
|
};
|
|
|
|
}
|