nixpkgs-suyu/pkgs/servers/home-assistant/appdaemon.nix

70 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, python3
, fetchFromGitHub
}:
2018-02-28 02:38:11 +01:00
2021-04-18 04:09:09 +02:00
python3.pkgs.buildPythonApplication rec {
2018-02-28 02:38:11 +01:00
pname = "appdaemon";
2021-04-18 04:09:09 +02:00
version = "4.0.8";
disabled = python3.pythonOlder "3.6";
2018-02-28 02:38:11 +01:00
2020-01-28 23:42:21 +01:00
src = fetchFromGitHub {
owner = "AppDaemon";
repo = pname;
2020-01-28 23:42:21 +01:00
rev = version;
2021-04-18 04:09:09 +02:00
sha256 = "04a4qx0rbx2vpkzpibmwkpy7fawa6dbgqlrllryrl7dchbrf703q";
2018-02-28 02:38:11 +01:00
};
2021-04-18 04:09:09 +02:00
# relax dependencies
2019-08-18 11:46:49 +02:00
postPatch = ''
2020-11-18 15:52:17 +01:00
substituteInPlace requirements.txt \
2021-04-18 04:09:09 +02:00
--replace "deepdiff==5.2.3" "deepdiff" \
--replace "pygments==2.8.1" "pygments"
sed -i 's/==/>=/' requirements.txt
'';
propagatedBuildInputs = with python3.pkgs; [
aiodns
aiohttp
aiohttp-jinja2
astral
2020-11-18 15:52:17 +01:00
azure-keyvault-secrets
2021-04-18 04:09:09 +02:00
azure-mgmt-compute
azure-mgmt-resource
azure-mgmt-storage
azure-storage-blob
bcrypt
cchardet
deepdiff
feedparser
iso8601
jinja2
paho-mqtt
pid
pygments
python-dateutil
python-engineio
python-socketio
pytz
pyyaml
requests
sockjs
uvloop
voluptuous
websocket-client
2021-04-18 04:09:09 +02:00
yarl
];
# no tests implemented
checkPhase = ''
$out/bin/appdaemon -v | grep -q "${version}"
2019-08-18 11:46:49 +02:00
'';
2018-02-28 02:38:11 +01:00
meta = with lib; {
2020-12-30 21:41:06 +01:00
description = "Sandboxed Python execution environment for writing automation apps for Home Assistant";
homepage = "https://github.com/AppDaemon/appdaemon";
2018-02-28 02:38:11 +01:00
license = licenses.mit;
maintainers = teams.home-assistant.members;
2018-02-28 02:38:11 +01:00
};
}