1{
2 lib,
3 buildPythonPackage,
4 casttube,
5 fetchFromGitHub,
6 pythonOlder,
7 protobuf,
8 setuptools,
9 zeroconf,
10}:
11
12buildPythonPackage rec {
13 pname = "pychromecast";
14 version = "14.0.9";
15 pyproject = true;
16
17 disabled = pythonOlder "3.11";
18
19 src = fetchFromGitHub {
20 owner = "home-assistant-libs";
21 repo = "pychromecast";
22 tag = version;
23 hash = "sha256-SpoVgXJV/9SVAcZXfeqpB3jkt9UUWcY9NBDGeIFhh4w=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace-fail "setuptools>=65.6,<81.0" setuptools \
29 --replace-fail "wheel>=0.37.1,<0.46.0" wheel
30 '';
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 casttube
36 protobuf
37 zeroconf
38 ];
39
40 # no tests available
41 doCheck = false;
42
43 pythonImportsCheck = [ "pychromecast" ];
44
45 meta = with lib; {
46 description = "Library for Python to communicate with the Google Chromecast";
47 homepage = "https://github.com/home-assistant-libs/pychromecast";
48 changelog = "https://github.com/home-assistant-libs/pychromecast/releases/tag/${src.tag}";
49 license = licenses.mit;
50 maintainers = [ ];
51 platforms = platforms.unix;
52 };
53}