2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
2021-03-23 19:22:30 +00:00
|
|
|
astral = super.astral.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "1.10.1";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "1wbvnqffbgh8grxm07cabdpahlnyfq91pyyaav432cahqi1p59nj";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
bcrypt = super.bcrypt.overridePythonAttrs (oldAttrs: rec {
|
2020-11-19 00:13:47 +00:00
|
|
|
version = "3.1.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
2020-11-19 00:13:47 +00:00
|
|
|
sha256 = "CwBpx1LsFBcsX3ggjxhj161nVab65v527CyA0TvkHkI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
yarl = super.yarl.overridePythonAttrs (oldAttrs: rec {
|
2020-11-19 00:13:47 +00:00
|
|
|
version = "1.4.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
2020-11-19 00:13:47 +00:00
|
|
|
sha256 = "WM2cRp7O1VjNgao/SEspJOiJcEngaIno/yUQQ1t+90s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in python.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "appdaemon";
|
2020-11-19 00:13:47 +00:00
|
|
|
version = "4.0.5";
|
2021-03-19 17:17:44 +00:00
|
|
|
disabled = python.pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-03-19 17:17:44 +00:00
|
|
|
owner = "AppDaemon";
|
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2020-11-19 00:13:47 +00:00
|
|
|
sha256 = "7o6DrTufAC+qK3dDfpkuQMQWuduCZ6Say/knI4Y07QM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
|
|
|
daemonize astral requests websocket_client aiohttp yarl jinja2
|
|
|
|
aiohttp-jinja2 pyyaml voluptuous feedparser iso8601 bcrypt paho-mqtt setuptools
|
2020-11-19 00:13:47 +00: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
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# no tests implemented
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-11-19 00:13:47 +00: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" \
|
2021-01-05 17:05:55 +00:00
|
|
|
--replace "python-socketio==4.4.0" "python-socketio" \
|
|
|
|
--replace "feedparser==5.2.1" "feedparser>=5.2.1" \
|
|
|
|
--replace "aiohttp_jinja2==1.2.0" "aiohttp_jinja2>=1.2.0" \
|
|
|
|
--replace "pygments==2.6.1" "pygments>=2.6.1" \
|
2021-03-19 17:17:44 +00:00
|
|
|
--replace "paho-mqtt==1.5.0" "paho-mqtt>=1.5.0" \
|
|
|
|
--replace "websocket-client==0.57.0" "websocket-client>=0.57.0"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-01-05 17:05:55 +00:00
|
|
|
description = "Sandboxed Python execution environment for writing automation apps for Home Assistant";
|
2021-03-19 17:17:44 +00:00
|
|
|
homepage = "https://github.com/AppDaemon/appdaemon";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg dotlambda ];
|
|
|
|
};
|
|
|
|
}
|