1{ lib 2, aiohttp 3, aioresponses 4, beautifulsoup4 5, buildPythonPackage 6, fetchFromGitHub 7, html5lib 8, pytest-asyncio 9, pytest-aiohttp 10, pytestCheckHook 11, pythonOlder 12, requests 13, requests-mock 14, setuptools 15, setuptools-scm 16, urllib3 17}: 18 19buildPythonPackage rec { 20 pname = "raincloudy"; 21 version = "1.2.0"; 22 format = "setuptools"; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "vanstinator"; 28 repo = pname; 29 rev = "refs/tags/${version}"; 30 hash = "sha256-qCkBVirM09iA1sXiOB9FJns8bHjQq7rRk8XbRWrtBDI="; 31 }; 32 33 nativeBuildInputs = [ 34 setuptools 35 setuptools-scm 36 ]; 37 38 SETUPTOOLS_SCM_PRETEND_VERSION = version; 39 40 postPatch = '' 41 # https://github.com/vanstinator/raincloudy/pull/60 42 substituteInPlace setup.py \ 43 --replace "bs4" "beautifulsoup4" \ 44 45 # fix raincloudy.aio package discovery, by relying on 46 # autodiscovery instead. 47 sed -i '/packages=/d' setup.py 48 ''; 49 50 propagatedBuildInputs = [ 51 aiohttp 52 requests 53 beautifulsoup4 54 urllib3 55 html5lib 56 ]; 57 58 nativeCheckInputs = [ 59 aioresponses 60 pytest-asyncio 61 pytest-aiohttp 62 pytestCheckHook 63 requests-mock 64 ]; 65 66 pythonImportsCheck = [ 67 "raincloudy" 68 "raincloudy.aio" 69 ]; 70 71 disabledTests = [ 72 # Test requires network access 73 "test_attributes" 74 ]; 75 76 meta = with lib; { 77 description = "Module to interact with Melnor RainCloud Smart Garden Watering Irrigation Timer"; 78 homepage = "https://github.com/vanstinator/raincloudy"; 79 license = with licenses; [ asl20 ]; 80 maintainers = with maintainers; [ fab ]; 81 }; 82}