9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
109 lines
1.9 KiB
Nix
109 lines
1.9 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, aiohttp
|
|
, bitarray
|
|
, chacha20poly1305-reuseable
|
|
, cryptography
|
|
, deepdiff
|
|
, fetchFromGitHub
|
|
, mediafile
|
|
, miniaudio
|
|
, netifaces
|
|
, protobuf
|
|
, pytest-aiohttp
|
|
, pytest-asyncio
|
|
, pytest-httpserver
|
|
, pytest-timeout
|
|
, pytestCheckHook
|
|
, pythonRelaxDepsHook
|
|
, pythonOlder
|
|
, requests
|
|
, srptools
|
|
, zeroconf
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyatv";
|
|
version = "0.13.2";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "postlund";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-7jXxnZLruwNzYVOn3c+YlF2olwezwjpwXInDem44/vE=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "pytest-runner" ""
|
|
'';
|
|
|
|
pythonRelaxDeps = [
|
|
"aiohttp"
|
|
"async_timeout"
|
|
"bitarray"
|
|
"chacha20poly1305-reuseable"
|
|
"cryptography"
|
|
"ifaddr"
|
|
"mediafile"
|
|
"miniaudio"
|
|
"protobuf"
|
|
"requests"
|
|
"srptools"
|
|
"zeroconf"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pythonRelaxDepsHook
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
bitarray
|
|
chacha20poly1305-reuseable
|
|
cryptography
|
|
mediafile
|
|
miniaudio
|
|
netifaces
|
|
protobuf
|
|
requests
|
|
srptools
|
|
zeroconf
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
deepdiff
|
|
pytest-aiohttp
|
|
pytest-asyncio
|
|
pytest-httpserver
|
|
pytest-timeout
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"--asyncio-mode=legacy"
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# Test doesn't work in the sandbox
|
|
"tests/protocols/companion/test_companion_auth.py"
|
|
"tests/protocols/mrp/test_mrp_auth.py"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
pythonImportsCheck = [
|
|
"pyatv"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python client library for the Apple TV";
|
|
homepage = "https://github.com/postlund/pyatv";
|
|
changelog = "https://github.com/postlund/pyatv/blob/v${version}/CHANGES.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|