2021-03-01 18:17:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-07-17 08:37:07 +01:00
|
|
|
, fetchFromGitHub
|
2021-03-01 18:17:54 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests_oauthlib
|
|
|
|
, simplejson
|
2021-07-17 08:37:07 +01:00
|
|
|
, pkce
|
|
|
|
, pytestCheckHook
|
2021-03-01 18:17:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyvicare";
|
2021-08-18 08:33:23 +01:00
|
|
|
version = "2.7.1";
|
2021-03-01 18:17:54 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-07-17 08:37:07 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "somm15";
|
|
|
|
repo = "PyViCare";
|
|
|
|
rev = version;
|
2021-08-18 08:33:23 +01:00
|
|
|
sha256 = "sha256-YczzB95RyOdRGEye1pUqCZxegtp6kjCtUUHYyHD0WP0=";
|
2021-03-01 18:17:54 +00:00
|
|
|
};
|
|
|
|
|
2021-07-17 08:37:07 +01:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2021-03-01 18:17:54 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests_oauthlib
|
|
|
|
simplejson
|
2021-07-17 08:37:07 +01:00
|
|
|
pkce
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-03-01 18:17:54 +00:00
|
|
|
];
|
|
|
|
|
2021-07-17 08:37:07 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version_config=True," 'version="${version}",' \
|
|
|
|
--replace "'setuptools-git-versioning'" " "
|
|
|
|
'';
|
|
|
|
|
2021-03-01 18:17:54 +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 ];
|
|
|
|
};
|
|
|
|
}
|