2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-05-29 06:06:01 +00:00
|
|
|
, aiohttp
|
2021-06-28 23:13:55 +00:00
|
|
|
, bitarray
|
2020-05-29 06:06:01 +00:00
|
|
|
, cryptography
|
|
|
|
, deepdiff
|
2021-03-19 17:17:44 +00:00
|
|
|
, fetchFromGitHub
|
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
|
|
|
, netifaces
|
|
|
|
, protobuf
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
2021-03-19 17:17:44 +00:00
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
2021-10-28 06:52:43 +00:00
|
|
|
, pythonOlder
|
2020-05-29 06:06:01 +00:00
|
|
|
, srptools
|
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";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.9.6";
|
2021-10-28 06:52:43 +00:00
|
|
|
format = "setuptools";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "postlund";
|
|
|
|
repo = pname;
|
2020-10-19 23:25:03 +00:00
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "0navm7a0k1679kj7nbkbyl7s2q0wq0xmcnizmnvp0arkd5xqmqv1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2021-06-28 23:13:55 +00:00
|
|
|
bitarray
|
2020-05-29 06:06:01 +00:00
|
|
|
cryptography
|
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
|
|
|
netifaces
|
2021-03-19 17:17:44 +00:00
|
|
|
protobuf
|
|
|
|
srptools
|
2020-10-16 20:44:37 +00:00
|
|
|
zeroconf
|
2020-05-29 06:06:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
deepdiff
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
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
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" ""
|
|
|
|
# Remove all version pinning
|
|
|
|
sed -i -e "s/==[0-9.]*//" requirements/requirements.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Test doesn't work in the sandbox
|
|
|
|
"tests/protocols/companion/test_companion_auth.py"
|
|
|
|
];
|
|
|
|
|
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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ elseym ];
|
|
|
|
};
|
|
|
|
}
|