1{ 2 lib, 3 aioredis, 4 apscheduler, 5 buildPythonPackage, 6 ephem, 7 fetchPypi, 8 hiredis, 9 pytestCheckHook, 10 pythonAtLeast, 11 pythonOlder, 12 pytz, 13 pyyaml, 14 setuptools, 15}: 16 17buildPythonPackage rec { 18 pname = "automate-home"; 19 version = "0.9.1"; 20 pyproject = true; 21 22 # Typing issue 23 disabled = pythonOlder "3.8" || pythonAtLeast "3.12"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-41qd+KPSrOrczkovwXht3irbcYlYehBZ1HZ44yZe4cM="; 28 }; 29 30 postPatch = '' 31 # Rename pyephem, https://github.com/majamassarini/automate-home/pull/3 32 substituteInPlace setup.py \ 33 --replace-fail "pyephem" "ephem" \ 34 --replace-fail "aioredis==1.3.1" "aioredis" 35 ''; 36 37 build-system = [ setuptools ]; 38 39 dependencies = [ 40 apscheduler 41 hiredis 42 aioredis 43 ephem 44 pytz 45 pyyaml 46 ]; 47 48 nativeCheckInputs = [ pytestCheckHook ]; 49 50 pythonImportsCheck = [ "home" ]; 51 52 meta = with lib; { 53 description = "Python module to automate (home) devices"; 54 homepage = "https://github.com/majamassarini/automate-home"; 55 changelog = "https://github.com/majamassarini/automate-home/releases/tag/${version}"; 56 license = licenses.gpl3Only; 57 maintainers = with maintainers; [ fab ]; 58 }; 59}