2021-12-24 04:21:11 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-03-15 16:39:30 +00:00
|
|
|
, apscheduler
|
2021-12-24 04:21:11 +00:00
|
|
|
, hiredis
|
|
|
|
, aioredis
|
|
|
|
, ephem
|
|
|
|
, pytz
|
|
|
|
, pyyaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "automate-home";
|
|
|
|
version = "0.9.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-41qd+KPSrOrczkovwXht3irbcYlYehBZ1HZ44yZe4cM=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
apscheduler
|
2021-12-24 04:21:11 +00:00
|
|
|
hiredis
|
|
|
|
aioredis
|
|
|
|
ephem
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-24 04:21:11 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Rename pyephem, https://github.com/majamassarini/automate-home/pull/3
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pyephem" "ephem" \
|
|
|
|
--replace "aioredis==1.3.1" "aioredis"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"home"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to automate (home) devices";
|
|
|
|
homepage = "https://github.com/majamassarini/automate-home";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|