2021-12-20 20:32:22 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-02-19 16:15:19 +00:00
|
|
|
, apscheduler
|
2021-12-20 20:32:22 +01:00
|
|
|
, hiredis
|
|
|
|
, aioredis
|
|
|
|
, ephem
|
2024-05-22 13:12:12 +02:00
|
|
|
, setuptools
|
2021-12-20 20:32:22 +01:00
|
|
|
, pytz
|
|
|
|
, pyyaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "automate-home";
|
|
|
|
version = "0.9.1";
|
2024-05-22 13:12:12 +02:00
|
|
|
pyproject = true;
|
2021-12-20 20:32:22 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-03 01:48:06 +01:00
|
|
|
hash = "sha256-41qd+KPSrOrczkovwXht3irbcYlYehBZ1HZ44yZe4cM=";
|
2021-12-20 20:32:22 +01:00
|
|
|
};
|
|
|
|
|
2024-05-22 13:12:12 +02: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-02-19 16:15:19 +00:00
|
|
|
apscheduler
|
2021-12-20 20:32:22 +01:00
|
|
|
hiredis
|
|
|
|
aioredis
|
|
|
|
ephem
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-20 20:32:22 +01:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"home"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to automate (home) devices";
|
|
|
|
homepage = "https://github.com/majamassarini/automate-home";
|
2024-05-22 13:12:12 +02:00
|
|
|
changelog = "https://github.com/majamassarini/automate-home/releases/tag/${version}";
|
2021-12-20 20:32:22 +01:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|