nixpkgs/pkgs/development/python-modules/pyatv/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

90 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
2020-05-27 18:24:11 +00:00
, aiohttp
, bitarray
, chacha20poly1305-reuseable
2020-05-27 18:24:11 +00:00
, cryptography
, deepdiff
, fetchFromGitHub
, mediafile
, miniaudio
2020-05-27 18:24:11 +00:00
, netifaces
, protobuf
, pytest-aiohttp
, pytest-asyncio
, pytest-timeout
, pytestCheckHook
, pythonOlder
2022-02-02 19:56:52 +00:00
, requests
2020-05-27 18:24:11 +00:00
, srptools
, zeroconf
2020-05-27 18:24:11 +00:00
}:
2018-11-22 22:16:50 +00:00
buildPythonPackage rec {
pname = "pyatv";
version = "0.10.3";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "postlund";
repo = pname;
rev = "v${version}";
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
bitarray
chacha20poly1305-reuseable
2020-05-27 18:24:11 +00:00
cryptography
mediafile
miniaudio
2020-05-27 18:24:11 +00:00
netifaces
protobuf
2022-02-02 19:56:52 +00:00
requests
srptools
zeroconf
2020-05-27 18:24:11 +00:00
];
checkInputs = [
deepdiff
pytest-aiohttp
pytest-asyncio
pytest-timeout
pytestCheckHook
2020-05-27 18:24:11 +00:00
];
pytestFlagsArray = [
"--asyncio-mode=legacy"
];
disabledTestPaths = [
# Test doesn't work in the sandbox
"tests/protocols/companion/test_companion_auth.py"
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [
"pyatv"
];
meta = with lib; {
description = "Python client library for the Apple TV";
homepage = "https://github.com/postlund/pyatv";
2018-11-22 22:16:50 +00:00
license = licenses.mit;
maintainers = with maintainers; [ ];
2018-11-22 22:16:50 +00:00
};
}