a66bca1520
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
51 lines
1 KiB
Nix
51 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, casttube
|
|
, fetchPypi
|
|
, pythonOlder
|
|
, protobuf
|
|
, requests
|
|
, zeroconf
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pychromecast";
|
|
version = "13.0.4";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "PyChromecast";
|
|
inherit version;
|
|
hash = "sha256-eS+6PzHklopemcGcdxd0CDoqp+iX6/b14hjjCOM6Rh8=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace requirements.txt \
|
|
--replace "protobuf>=3.19.1,<4" "protobuf>=3.19.1"
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
casttube
|
|
protobuf
|
|
requests
|
|
zeroconf
|
|
];
|
|
|
|
# no tests available
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"pychromecast"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Library for Python to communicate with the Google Chromecast";
|
|
homepage = "https://github.com/home-assistant-libs/pychromecast";
|
|
changelog = "https://github.com/home-assistant-libs/pychromecast/releases/tag/${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ abbradar ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|