2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aioredis,
|
|
|
|
apscheduler,
|
|
|
|
buildPythonPackage,
|
|
|
|
ephem,
|
|
|
|
fetchPypi,
|
|
|
|
hiredis,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
pyyaml,
|
|
|
|
setuptools,
|
2021-12-24 04:21:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "automate-home";
|
|
|
|
version = "0.9.1";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2021-12-24 04:21:11 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# Typing issue
|
|
|
|
disabled = pythonOlder "3.8" || pythonAtLeast "3.12";
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Rename pyephem, https://github.com/majamassarini/automate-home/pull/3
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail "pyephem" "ephem" \
|
|
|
|
--replace-fail "aioredis==1.3.1" "aioredis"
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-03-15 16:39:30 +00:00
|
|
|
apscheduler
|
2021-12-24 04:21:11 +00:00
|
|
|
hiredis
|
|
|
|
aioredis
|
|
|
|
ephem
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "home" ];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to automate (home) devices";
|
|
|
|
homepage = "https://github.com/majamassarini/automate-home";
|
2024-06-05 15:53:02 +00:00
|
|
|
changelog = "https://github.com/majamassarini/automate-home/releases/tag/${version}";
|
2021-12-24 04:21:11 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|