72 lines
1.2 KiB
Nix
72 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, aiohttp
|
|
, bitarray
|
|
, cryptography
|
|
, deepdiff
|
|
, fetchFromGitHub
|
|
, mediafile
|
|
, miniaudio
|
|
, netifaces
|
|
, protobuf
|
|
, pytest-aiohttp
|
|
, pytest-asyncio
|
|
, pytest-timeout
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, srptools
|
|
, zeroconf
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyatv";
|
|
version = "0.9.6";
|
|
|
|
format = "setuptools";
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "postlund";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0navm7a0k1679kj7nbkbyl7s2q0wq0xmcnizmnvp0arkd5xqmqv1";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "pytest-runner" ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
bitarray
|
|
cryptography
|
|
mediafile
|
|
miniaudio
|
|
netifaces
|
|
protobuf
|
|
srptools
|
|
zeroconf
|
|
];
|
|
|
|
checkInputs = [
|
|
deepdiff
|
|
pytest-aiohttp
|
|
pytest-asyncio
|
|
pytest-timeout
|
|
pytestCheckHook
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
pythonImportsCheck = [
|
|
"pyatv"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python client library for the Apple TV";
|
|
homepage = "https://github.com/postlund/pyatv";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ elseym ];
|
|
};
|
|
}
|