depot/third_party/nixpkgs/pkgs/development/python-modules/aiolivisi/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

48 lines
1.1 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchPypi,
pydantic,
pythonOlder,
websockets,
}:
buildPythonPackage rec {
pname = "aiolivisi";
version = "0.0.19";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-eT/sqLykd4gQVt972646mH+QArf7p/XQH53/UtsuKRs=";
};
postPatch = ''
# https://github.com/StefanIacobLivisi/aiolivisi/pull/3
substituteInPlace setup.py \
--replace 'REQUIREMENTS = list(val.strip() for val in open("requirements.txt"))' "" \
--replace "REQUIREMENTS," "[],"
'';
propagatedBuildInputs = [
aiohttp
pydantic
websockets
];
# Module has no tests
doCheck = false;
pythonImportsCheck = [ "aiolivisi" ];
meta = with lib; {
description = "Module to communicate with LIVISI Smart Home Controller";
homepage = "https://github.com/StefanIacobLivisi/aiolivisi";
changelog = "https://github.com/StefanIacobLivisi/aiolivisi/releases/tag/${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}