1{ lib
2, buildPythonPackage
3, casttube
4, fetchPypi
5, pythonOlder
6, protobuf
7, requests
8, zeroconf
9}:
10
11buildPythonPackage rec {
12 pname = "pychromecast";
13 version = "13.0.7";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 pname = "PyChromecast";
20 inherit version;
21 hash = "sha256-DemOnlvkMmndQe+xYSarDVupQcpKyuAkMpcShRwMAyQ=";
22 };
23
24 postPatch = ''
25 substituteInPlace requirements.txt \
26 --replace "protobuf>=3.19.1,<4" "protobuf>=3.19.1"
27 '';
28
29 propagatedBuildInputs = [
30 casttube
31 protobuf
32 requests
33 zeroconf
34 ];
35
36 # no tests available
37 doCheck = false;
38
39 pythonImportsCheck = [
40 "pychromecast"
41 ];
42
43 meta = with lib; {
44 description = "Library for Python to communicate with the Google Chromecast";
45 homepage = "https://github.com/home-assistant-libs/pychromecast";
46 changelog = "https://github.com/home-assistant-libs/pychromecast/releases/tag/${version}";
47 license = licenses.mit;
48 maintainers = with maintainers; [ abbradar ];
49 platforms = platforms.unix;
50 };
51}