2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, casttube
|
|
|
|
, fetchPypi
|
2022-11-27 09:42:12 +00:00
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
, protobuf
|
|
|
|
, requests
|
|
|
|
, zeroconf
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "pychromecast";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "13.0.6";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "PyChromecast";
|
|
|
|
inherit version;
|
2023-03-30 22:05:00 +00:00
|
|
|
hash = "sha256-FJ2tKMvtIpa1B0wyZmLZywCTuDS0F8ue4Fgo6XsoLnM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "protobuf>=3.19.1,<4" "protobuf>=3.19.1"
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
casttube
|
|
|
|
protobuf
|
|
|
|
requests
|
|
|
|
zeroconf
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
# no tests available
|
|
|
|
doCheck = false;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pychromecast"
|
|
|
|
];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-01-05 17:05:55 +00:00
|
|
|
description = "Library for Python to communicate with the Google Chromecast";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/home-assistant-libs/pychromecast";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/home-assistant-libs/pychromecast/releases/tag/${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|