diff --git a/pkgs/tools/misc/esphome/dashboard.nix b/pkgs/tools/misc/esphome/dashboard.nix new file mode 100644 index 000000000000..3edf59002b3d --- /dev/null +++ b/pkgs/tools/misc/esphome/dashboard.nix @@ -0,0 +1,20 @@ +{ lib +, python3 +}: + +with python3.pkgs; buildPythonPackage rec { + pname = "esphome-dashboard"; + version = "20210615.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "07ammr46bipfi4b7nnjkip5l7966wxqhp5n3g2wqf68m3ymx24s9"; + }; + + meta = with lib; { + description = "ESPHome dashboard"; + homepage = "https://esphome.io/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix index fe02fe0d5219..1daf4f139cf6 100644 --- a/pkgs/tools/misc/esphome/default.nix +++ b/pkgs/tools/misc/esphome/default.nix @@ -1,4 +1,5 @@ { lib +, pkgs , python3 , fetchFromGitHub , platformio @@ -6,15 +7,18 @@ , git }: +let + esphome-dashboard = pkgs.callPackage ./dashboard.nix {}; +in python3.pkgs.buildPythonApplication rec { pname = "esphome"; - version = "1.18.0"; + version = "1.19.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "1vz3d59wfqssfv1kvd4minlxibr0id06xfyg8956w9s3b22jc5vq"; + sha256 = "07brvpsy40jv30h0a0ywrw4bgwajjd37xznw34s8k53y92qs8lfi"; }; postPatch = '' @@ -44,6 +48,7 @@ python3.pkgs.buildPythonApplication rec { click colorama cryptography + esphome-dashboard ifaddr paho-mqtt pillow @@ -66,6 +71,7 @@ python3.pkgs.buildPythonApplication rec { checkInputs = with python3.pkgs; [ hypothesis mock + pytest-asyncio pytest-mock pytest-sugar pytestCheckHook @@ -75,6 +81,10 @@ python3.pkgs.buildPythonApplication rec { $out/bin/esphome --help > /dev/null ''; + passthru = { + dashboard = esphome-dashboard; + }; + meta = with lib; { description = "Make creating custom firmwares for ESP32/ESP8266 super easy"; homepage = "https://esphome.io/";