51 lines
1 KiB
Nix
51 lines
1 KiB
Nix
{
|
|
lib,
|
|
authlib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
poetry-core,
|
|
requests,
|
|
pytest-cov-stub,
|
|
pytestCheckHook,
|
|
simplejson,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyvicare";
|
|
version = "2.35.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "openviess";
|
|
repo = "PyViCare";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-5VvbbCQTc2EG7YsQlPd3BRwDtJzIuEX2yLs2RWFeFDM=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail 'version = "0.1.0"' 'version = "${version}"'
|
|
'';
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
dependencies = [
|
|
authlib
|
|
requests
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-cov-stub
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "PyViCare" ];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/openviess/PyViCare/releases/tag/${version}";
|
|
description = "Python Library to access Viessmann ViCare API";
|
|
homepage = "https://github.com/somm15/PyViCare";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|