2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
casttube,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
protobuf,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
|
|
|
zeroconf,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "pychromecast";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "14.0.1";
|
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "PyChromecast";
|
|
|
|
inherit version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-4W4Kf5SIMZGRuLT6IcoL60vxLu2lyb9kAkEYjyvqCj4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
postPatch = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "setuptools~=65.6" "setuptools" \
|
|
|
|
--replace-fail "wheel~=0.37.1" "wheel" \
|
|
|
|
--replace-fail "protobuf>=4.25.1" "protobuf"
|
2022-09-30 11:47:45 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
casttube
|
|
|
|
protobuf
|
|
|
|
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
|
|
|
|
2024-06-05 15:53:02 +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
|
|
|
};
|
|
|
|
}
|