3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pyvicare/default.nix

50 lines
1,000 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, requests_oauthlib
, simplejson
, pkce
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pyvicare";
2021-08-18 08:33:23 +01:00
version = "2.7.1";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "somm15";
repo = "PyViCare";
rev = version;
2021-08-18 08:33:23 +01:00
sha256 = "sha256-YczzB95RyOdRGEye1pUqCZxegtp6kjCtUUHYyHD0WP0=";
};
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 ];
};
}