nixpkgs/pkgs/servers/home-assistant/appdaemon.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

60 lines
1.2 KiB
Nix

{ lib
, python3
, fetchFromGitHub
}:
python3.pkgs.buildPythonApplication rec {
pname = "appdaemon";
version = "4.4.2";
pyproject = true;
src = fetchFromGitHub {
owner = "AppDaemon";
repo = "appdaemon";
rev = "refs/tags/${version}";
hash = "sha256-T3InE4J4qYeFJTq6nrW8y5BOA7Z0n3t9eVpl641r/xk=";
};
pythonRelaxDeps = true;
nativeBuildInputs = with python3.pkgs; [
pythonRelaxDepsHook
setuptools
];
propagatedBuildInputs = with python3.pkgs; [
aiohttp
aiohttp-jinja2
astral
bcrypt
deepdiff
feedparser
iso8601
paho-mqtt
pid
python-dateutil
python-socketio
pytz
pyyaml
requests
sockjs
uvloop
websocket-client
tomli
tomli-w
];
# 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";
mainProgram = "appdaemon";
homepage = "https://github.com/AppDaemon/appdaemon";
changelog = "https://github.com/AppDaemon/appdaemon/blob/${version}/docs/HISTORY.md";
license = licenses.mit;
maintainers = teams.home-assistant.members;
};
}