Unverified Commit 57fe4f50 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #327911 from mweinelt/esphome-2024.7.0

esphome: 2024.6.6 -> 2024.7.0; build dashboard from source
parents a0812b38 7b5fa260
Loading
Loading
Loading
Loading
+35 −6
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, fetchNpmDeps

# build-system
, setuptools
, nodejs
, npmHooks

}:

buildPythonPackage rec {
  pname = "esphome-dashboard";
  version = "20240620.0";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    pname = "esphome_dashboard";
    inherit version;
    hash = "sha256-lx3i8Z2PUefyibCNiQ4zPEwfgXr6r/TVa9TBF0YE5fA=";
  src = fetchFromGitHub {
    owner = "esphome";
    repo = "dashboard";
    rev = "refs/tags/${version}";
    hash = "sha256-LmIxfX3rcRK90h31J0B5T02f48MCctFERgXxf0zkDm0=";
  };

  npmDeps = fetchNpmDeps {
    inherit src;
    hash = "sha256-xMVESS1bPNJF07joUgY8ku+GWtflWhM8mYAv0emggc8=";
  };

  build-system = [ setuptools ];

  nativeBuildInputs = [
    nodejs
    npmHooks.npmConfigHook
  ];

  postPatch = ''
    # https://github.com/esphome/dashboard/pull/639
    patchShebangs script/build
  '';

  preBuild = ''
    script/build
  '';

  # no tests
  doCheck = false;

+2 −2
Original line number Diff line number Diff line
@@ -19,14 +19,14 @@ let
in
python.pkgs.buildPythonApplication rec {
  pname = "esphome";
  version = "2024.6.6";
  version = "2024.7.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-/EGj6kEgUhQefdFz/IllKWeVGLhC3STiOOsy3Pq4pIM=";
    hash = "sha256-bQGsLt8+WPaQfQ9ReKGrIS1O071LkpAxJerfHO3E0Oc=";
  };

  nativeBuildInputs = with python.pkgs; [