summaryrefslogtreecommitdiffstats
path: root/pkgs/servers/home-assistant/appdaemon.nix
blob: b104bb15997d44fa9d19dd0d4e83a786c80f092b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ lib
, python3
, fetchFromGitHub
}:

python3.pkgs.buildPythonApplication rec {
  pname = "appdaemon";
  version = "4.2.1";
  format = "setuptools";

  disabled = python3.pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "AppDaemon";
    repo = "appdaemon";
    rev = "refs/tags/${version}";
    hash = "sha256-4sN0optkMmyWb5Cd3F7AhcXYHh7aidJE/bieYMEKgSY=";
  };

  postPatch = ''
    # relax dependencies
    sed -i 's/==/>=/' requirements.txt
  '';

  propagatedBuildInputs = with python3.pkgs; [
    aiodns
    aiohttp
    aiohttp-jinja2
    astral
    azure-keyvault-secrets
    azure-mgmt-compute
    azure-mgmt-resource
    azure-mgmt-storage
    azure-storage-blob
    bcrypt
    faust-cchardet
    deepdiff
    feedparser
    iso8601
    jinja2
    paho-mqtt
    pid
    pygments
    python-dateutil
    python-engineio
    python-socketio
    pytz
    pyyaml
    requests
    sockjs
    uvloop
    voluptuous
    websocket-client
    yarl
  ];

  # no tests implemented
  checkPhase = ''
    $out/bin/appdaemon -v | grep -q "${version}"
  '';

  meta = with lib; {
    description = "Sandboxed Python execution environment for writing automation apps for Home Assistant";
    homepage = "https://github.com/AppDaemon/appdaemon";
    changelog = "https://github.com/AppDaemon/appdaemon/blob/${version}/docs/HISTORY.rst";
    license = licenses.mit;
    maintainers = teams.home-assistant.members;
  };
}