2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-05-29 06:06:01 +00:00
|
|
|
, aiohttp
|
2023-11-16 04:20:00 +00:00
|
|
|
, async-timeout
|
2022-07-14 12:49:19 +00:00
|
|
|
, chacha20poly1305-reuseable
|
2020-05-29 06:06:01 +00:00
|
|
|
, cryptography
|
|
|
|
, deepdiff
|
2021-03-19 17:17:44 +00:00
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
, ifaddr
|
2021-10-28 06:52:43 +00:00
|
|
|
, mediafile
|
2021-06-28 23:13:55 +00:00
|
|
|
, miniaudio
|
2020-05-29 06:06:01 +00:00
|
|
|
, protobuf
|
2023-11-16 04:20:00 +00:00
|
|
|
, pydantic
|
|
|
|
, pyfakefs
|
2020-05-29 06:06:01 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
2023-07-15 17:15:38 +00:00
|
|
|
, pytest-httpserver
|
2021-03-19 17:17:44 +00:00
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
2022-12-28 21:21:41 +00:00
|
|
|
, pythonRelaxDepsHook
|
2024-04-21 15:54:59 +00:00
|
|
|
, pythonAtLeast
|
2021-10-28 06:52:43 +00:00
|
|
|
, pythonOlder
|
2022-02-10 20:34:41 +00:00
|
|
|
, requests
|
2023-11-16 04:20:00 +00:00
|
|
|
, setuptools
|
2020-05-29 06:06:01 +00:00
|
|
|
, srptools
|
2023-08-04 22:07:22 +00:00
|
|
|
, stdenv
|
2023-11-16 04:20:00 +00:00
|
|
|
, tabulate
|
2020-10-16 20:44:37 +00:00
|
|
|
, zeroconf
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyatv";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.14.5";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "postlund";
|
2023-11-16 04:20:00 +00:00
|
|
|
repo = "pyatv";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Uykj9MIUFcZyTWOBjUhL9+qItbnpwtuTd2Cx5jI7Wtw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" ""
|
|
|
|
'';
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"aiohttp"
|
|
|
|
"async_timeout"
|
|
|
|
"bitarray"
|
|
|
|
"chacha20poly1305-reuseable"
|
|
|
|
"cryptography"
|
|
|
|
"ifaddr"
|
|
|
|
"mediafile"
|
|
|
|
"miniaudio"
|
|
|
|
"protobuf"
|
|
|
|
"requests"
|
|
|
|
"srptools"
|
|
|
|
"zeroconf"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pythonRelaxDepsHook
|
2023-11-16 04:20:00 +00:00
|
|
|
setuptools
|
2022-12-28 21:21:41 +00:00
|
|
|
];
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2023-11-16 04:20:00 +00:00
|
|
|
async-timeout
|
2022-07-14 12:49:19 +00:00
|
|
|
chacha20poly1305-reuseable
|
2020-05-29 06:06:01 +00:00
|
|
|
cryptography
|
2023-11-16 04:20:00 +00:00
|
|
|
ifaddr
|
2021-10-28 06:52:43 +00:00
|
|
|
mediafile
|
2021-06-28 23:13:55 +00:00
|
|
|
miniaudio
|
2021-03-19 17:17:44 +00:00
|
|
|
protobuf
|
2023-11-16 04:20:00 +00:00
|
|
|
pydantic
|
2022-02-10 20:34:41 +00:00
|
|
|
requests
|
2021-03-19 17:17:44 +00:00
|
|
|
srptools
|
2023-11-16 04:20:00 +00:00
|
|
|
tabulate
|
2020-10-16 20:44:37 +00:00
|
|
|
zeroconf
|
2020-05-29 06:06:01 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-05-29 06:06:01 +00:00
|
|
|
deepdiff
|
2023-11-16 04:20:00 +00:00
|
|
|
pyfakefs
|
2020-05-29 06:06:01 +00:00
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
2023-07-15 17:15:38 +00:00
|
|
|
pytest-httpserver
|
2021-03-19 17:17:44 +00:00
|
|
|
pytest-timeout
|
2020-10-19 23:25:03 +00:00
|
|
|
pytestCheckHook
|
2020-05-29 06:06:01 +00:00
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/postlund/pyatv/issues/2307
|
|
|
|
"test_zeroconf_service_published"
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.12") [
|
|
|
|
# https://github.com/postlund/pyatv/issues/2365
|
|
|
|
"test_simple_dispatch"
|
2024-01-02 11:29:13 +00:00
|
|
|
] ++ lib.optionals (stdenv.isDarwin) [
|
2023-08-04 22:07:22 +00:00
|
|
|
# tests/protocols/raop/test_raop_functional.py::test_stream_retransmission[raop_properties2-2-True] - assert False
|
|
|
|
"test_stream_retransmission"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Test doesn't work in the sandbox
|
|
|
|
"tests/protocols/companion/test_companion_auth.py"
|
2022-12-28 21:21:41 +00:00
|
|
|
"tests/protocols/mrp/test_mrp_auth.py"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyatv"
|
|
|
|
];
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-03-19 17:17:44 +00:00
|
|
|
description = "Python client library for the Apple TV";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/postlund/pyatv";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/postlund/pyatv/blob/v${version}/CHANGES.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-12-28 21:21:41 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|