nixpkgs/pkgs/development/python-modules/pyvicare/default.nix
2021-07-25 22:07:45 +02:00

50 lines
999 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, requests_oauthlib
, simplejson
, pkce
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pyvicare";
version = "1.1";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "somm15";
repo = "PyViCare";
rev = version;
sha256 = "1mkbz1gl8bv4j7q82cbc9d3dzx80brzdwrcp8z3kma1b91ig99bk";
};
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 ];
};
}