esphome: add update script that includes the dashboard

This commit is contained in:
Martin Weinelt 2022-09-29 14:31:01 +02:00
parent c57357368c
commit e66af0e110
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 13 additions and 0 deletions

View file

@ -91,6 +91,7 @@ with python.pkgs; buildPythonApplication rec {
passthru = { passthru = {
dashboard = esphome-dashboard; dashboard = esphome-dashboard;
updateScript = callPackage ./update.nix {};
}; };
meta = with lib; { meta = with lib; {

View file

@ -0,0 +1,12 @@
{ writeShellScript
, lib
, git
, nix-update
}:
writeShellScript "update-esphome" ''
PATH=${lib.makeBinPath [ git nix-update ]}
nix-update esphome.dashboard
nix-update esphome
''