From e66af0e1105d45d2e4869357110d1d3dc88206c3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 14:31:01 +0200 Subject: [PATCH] esphome: add update script that includes the dashboard --- pkgs/tools/misc/esphome/default.nix | 1 + pkgs/tools/misc/esphome/update.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 pkgs/tools/misc/esphome/update.nix diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix index 4dc8058c83c4..3ea44a8e30c6 100644 --- a/pkgs/tools/misc/esphome/default.nix +++ b/pkgs/tools/misc/esphome/default.nix @@ -91,6 +91,7 @@ with python.pkgs; buildPythonApplication rec { passthru = { dashboard = esphome-dashboard; + updateScript = callPackage ./update.nix {}; }; meta = with lib; { diff --git a/pkgs/tools/misc/esphome/update.nix b/pkgs/tools/misc/esphome/update.nix new file mode 100644 index 000000000000..ea4137662054 --- /dev/null +++ b/pkgs/tools/misc/esphome/update.nix @@ -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 +''