My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/pyvicare/default.nix

53 lines
1.0 KiB

{ lib
, buildPythonPackage
, fetchFromGitHub
, pkce
, pytestCheckHook
, pythonOlder
, requests-oauthlib
, simplejson
}:
buildPythonPackage rec {
pname = "pyvicare";
version = "2.16.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "somm15";
repo = "PyViCare";
rev = version;
sha256 = "sha256-fBqFvMb6/dg8PU2JYrXbOonXnS64d4ij81dRb30bVRc=";
};
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'" " "
'';
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 ];
};
}