a3d4720129
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
53 lines
1 KiB
Nix
53 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pkce
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, requests-oauthlib
|
|
, simplejson
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyvicare";
|
|
version = "2.22.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "somm15";
|
|
repo = "PyViCare";
|
|
rev = version;
|
|
sha256 = "sha256-1Vfdp0JOqDlt07BCTJXcJ1V0kTzGwCR0ccnGlCYgtEM=";
|
|
};
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
propagatedBuildInputs = [
|
|
requests-oauthlib
|
|
simplejson
|
|
pkce
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "version_config=True," 'version="${version}",' \
|
|
--replace "'setuptools-git-versioning<1.8.0'" ""
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|