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