Merge pull request #212874 from mweinelt/esphome-dashboard-update
esphome: 2022.12.4 -> 2022.12.6
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{ lib
|
||||
, callPackage
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, platformio
|
||||
@@ -13,16 +14,16 @@ let
|
||||
};
|
||||
};
|
||||
in
|
||||
with python.pkgs; buildPythonApplication rec {
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "esphome";
|
||||
version = "2022.12.4";
|
||||
version = "2022.12.8";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-HU4S6U5v0r93z4T6JpclEF6Cw6vy0VoprVyI4Z2Ti7s=";
|
||||
hash = "sha256-VKxCdejQGWLYeNOxa1PCwhdrLilnsYD9UBqj8Sen+OM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -42,7 +43,7 @@ with python.pkgs; buildPythonApplication rec {
|
||||
# They have validation functions like:
|
||||
# - validate_cryptography_installed
|
||||
# - validate_pillow_installed
|
||||
propagatedBuildInputs = [
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
aioesphomeapi
|
||||
click
|
||||
colorama
|
||||
@@ -71,12 +72,11 @@ with python.pkgs; buildPythonApplication rec {
|
||||
"--set ESPHOME_USE_SUBPROCESS ''"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
nativeCheckInputs = with python.pkgs; [
|
||||
hypothesis
|
||||
mock
|
||||
pytest-asyncio
|
||||
pytest-mock
|
||||
pytest-sugar
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
@@ -92,7 +92,7 @@ with python.pkgs; buildPythonApplication rec {
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
dashboard = esphome-dashboard;
|
||||
dashboard = python.pkgs.esphome-dashboard;
|
||||
updateScript = callPackage ./update.nix {};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,23 @@
|
||||
{ writeShellScript
|
||||
, lib
|
||||
, curl
|
||||
, jq
|
||||
, git
|
||||
, gnugrep
|
||||
, gnused
|
||||
, nix-update
|
||||
}:
|
||||
|
||||
writeShellScript "update-esphome" ''
|
||||
PATH=${lib.makeBinPath [ git nix-update ]}
|
||||
PATH=${lib.makeBinPath [ curl gnugrep gnused jq git nix-update ]}
|
||||
|
||||
nix-update esphome.dashboard
|
||||
nix-update esphome
|
||||
LATEST=$(curl https://api.github.com/repos/esphome/esphome/releases/latest | jq -r '.name')
|
||||
echo "Latest version: $LATEST"
|
||||
|
||||
DASHBOARD_VERSION=$(curl https://raw.githubusercontent.com/esphome/esphome/$LATEST/requirements.txt | \
|
||||
grep "esphome-dashboard==" | sed "s/.*=//")
|
||||
echo "Dashboard version: $DASHBOARD_VERSION"
|
||||
|
||||
nix-update esphome.dashboard --version $DASHBOARD_VERSION
|
||||
nix-update esphome --version $LATEST
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user