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

72 lines
2.2 KiB
Nix
Raw Normal View History

2020-01-28 23:42:21 +01:00
{ lib, python3, fetchFromGitHub }:
2018-02-28 02:38:11 +01:00
let
python = python3.override {
packageOverrides = self: super: {
2020-01-28 23:42:21 +01:00
bcrypt = super.bcrypt.overridePythonAttrs (oldAttrs: rec {
2020-11-18 15:52:17 +01:00
version = "3.1.7";
2018-02-28 02:38:11 +01:00
src = oldAttrs.src.override {
inherit version;
2020-11-18 15:52:17 +01:00
sha256 = "CwBpx1LsFBcsX3ggjxhj161nVab65v527CyA0TvkHkI=";
2018-02-28 02:38:11 +01:00
};
});
yarl = super.yarl.overridePythonAttrs (oldAttrs: rec {
2020-11-18 15:52:17 +01:00
version = "1.4.2";
2018-02-28 02:38:11 +01:00
src = oldAttrs.src.override {
inherit version;
2020-11-18 15:52:17 +01:00
sha256 = "WM2cRp7O1VjNgao/SEspJOiJcEngaIno/yUQQ1t+90s=";
2018-02-28 02:38:11 +01:00
};
});
};
};
in python.pkgs.buildPythonApplication rec {
pname = "appdaemon";
2020-11-18 15:52:17 +01:00
version = "4.0.5";
2018-02-28 02:38:11 +01:00
2020-01-28 23:42:21 +01:00
src = fetchFromGitHub {
owner = "home-assistant";
repo = "appdaemon";
rev = version;
2020-11-18 15:52:17 +01:00
sha256 = "7o6DrTufAC+qK3dDfpkuQMQWuduCZ6Say/knI4Y07QM=";
2018-02-28 02:38:11 +01:00
};
propagatedBuildInputs = with python.pkgs; [
2020-01-28 23:42:21 +01:00
daemonize astral requests websocket_client aiohttp yarl jinja2
2019-11-02 22:52:12 +01:00
aiohttp-jinja2 pyyaml voluptuous feedparser iso8601 bcrypt paho-mqtt setuptools
2020-11-18 15:52:17 +01:00
deepdiff dateutil bcrypt python-socketio pid pytz sockjs pygments
azure-mgmt-compute azure-mgmt-storage azure-mgmt-resource azure-keyvault-secrets azure-storage-blob
2018-02-28 02:38:11 +01:00
];
# no tests implemented
doCheck = false;
2019-08-18 11:46:49 +02:00
postPatch = ''
2020-11-18 15:52:17 +01:00
substituteInPlace requirements.txt \
--replace "pyyaml==5.3" "pyyaml" \
--replace "pid==2.2.5" "pid" \
--replace "Jinja2==2.11.1" "Jinja2" \
--replace "pytz==2019.3" "pytz" \
--replace "aiohttp==3.6.2" "aiohttp>=3.6" \
--replace "iso8601==0.1.12" "iso8601>=0.1" \
--replace "azure==4.0.0" "azure-mgmt-compute
azure-mgmt-storage
azure-mgmt-resource
azure-keyvault-secrets
azure-storage-blob" \
--replace "sockjs==0.10.0" "sockjs" \
--replace "deepdiff==4.3.1" "deepdiff" \
--replace "voluptuous==0.11.7" "voluptuous" \
--replace "astral==1.10.1" "astral" \
--replace "python-socketio==4.4.0" "python-socketio"
2019-08-18 11:46:49 +02:00
'';
2018-02-28 02:38:11 +01:00
meta = with lib; {
description = "Sandboxed python execution environment for writing automation apps for Home Assistant";
homepage = "https://github.com/home-assistant/appdaemon";
2018-02-28 02:38:11 +01:00
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg dotlambda ];
};
}