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