depot/third_party/nixpkgs/pkgs/development/python-modules/pychromecast/default.nix
Default email 5083ee08a2 Project import generated by Copybara.
GitOrigin-RevId: 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
2022-09-30 06:47:45 -05:00

50 lines
952 B
Nix

{ lib
, buildPythonPackage
, casttube
, fetchPypi
, isPy3k
, protobuf
, requests
, zeroconf
}:
buildPythonPackage rec {
pname = "pychromecast";
version = "12.1.4";
format = "setuptools";
disabled = !isPy3k;
src = fetchPypi {
pname = "PyChromecast";
inherit version;
sha256 = "sha256-nlfcmFpKBdtb3NXaIZy/bO0lVIygk/jXS8EHs8VU7AA=";
};
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";
license = licenses.mit;
maintainers = with maintainers; [ abbradar ];
platforms = platforms.unix;
};
}