1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, hatch-vcs 5, hatchling 6, httpx 7, pytestCheckHook 8, pythonOlder 9, respx 10}: 11 12buildPythonPackage rec { 13 pname = "iaqualink"; 14 version = "0.5.0"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "flz"; 21 repo = "iaqualink-py"; 22 rev = "v${version}"; 23 hash = "sha256-ewPP2Xq+ecZGc5kokvLEsRokGqTWlymrzkwk480tapk="; 24 }; 25 26 SETUPTOOLS_SCM_PRETEND_VERSION = version; 27 28 nativeBuildInputs = [ 29 hatch-vcs 30 hatchling 31 ]; 32 33 propagatedBuildInputs = [ 34 httpx 35 ] ++ httpx.optional-dependencies.http2; 36 37 checkInputs = [ 38 pytestCheckHook 39 respx 40 ]; 41 42 postPatch = '' 43 substituteInPlace pyproject.toml \ 44 --replace "pytest --cov-config=pyproject.toml --cov-report=xml --cov-report=term --cov=src --cov=tests" "" 45 ''; 46 47 pythonImportsCheck = [ 48 "iaqualink" 49 ]; 50 51 meta = with lib; { 52 description = "Python library for Jandy iAqualink"; 53 homepage = "https://github.com/flz/iaqualink-py"; 54 license = with licenses; [ bsd3 ]; 55 maintainers = with maintainers; [ fab ]; 56 }; 57}