2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-07-18 21:22:44 +00:00
|
|
|
, fetchFromGitHub
|
2021-03-09 03:18:52 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests_oauthlib
|
|
|
|
, simplejson
|
2021-07-18 21:22:44 +00:00
|
|
|
, pkce
|
|
|
|
, pytestCheckHook
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyvicare";
|
2021-10-17 02:12:59 +00:00
|
|
|
version = "2.13.0";
|
2021-03-09 03:18:52 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "somm15";
|
|
|
|
repo = "PyViCare";
|
|
|
|
rev = version;
|
2021-10-17 02:12:59 +00:00
|
|
|
sha256 = "sha256-v1twWyxd0nhXxvbRCbnH5TP736eeDYE5Nz62sf6HIcA=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests_oauthlib
|
|
|
|
simplejson
|
2021-07-18 21:22:44 +00:00
|
|
|
pkce
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version_config=True," 'version="${version}",' \
|
|
|
|
--replace "'setuptools-git-versioning'" " "
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonImportsCheck = [ "PyViCare" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Library to access Viessmann ViCare API";
|
|
|
|
homepage = "https://github.com/somm15/PyViCare";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|