Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pychromecast / default.nix
blob55c687d89430b1263284595f6c9bebcfe52a5c31
1 { lib
2 , buildPythonPackage
3 , casttube
4 , fetchPypi
5 , pythonOlder
6 , protobuf
7 , requests
8 , zeroconf
9 }:
11 buildPythonPackage rec {
12   pname = "pychromecast";
13   version = "13.0.7";
14   format = "setuptools";
16   disabled = pythonOlder "3.7";
18   src = fetchPypi {
19     pname = "PyChromecast";
20     inherit version;
21     hash = "sha256-DemOnlvkMmndQe+xYSarDVupQcpKyuAkMpcShRwMAyQ=";
22   };
24   postPatch = ''
25     substituteInPlace requirements.txt \
26       --replace "protobuf>=3.19.1,<4" "protobuf>=3.19.1"
27   '';
29   propagatedBuildInputs = [
30     casttube
31     protobuf
32     requests
33     zeroconf
34   ];
36   # no tests available
37   doCheck = false;
39   pythonImportsCheck = [
40     "pychromecast"
41   ];
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   };