2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
2022-02-10 20:34:41 +00:00
|
|
|
, buildPythonPackage
|
2024-07-27 06:49:29 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchNpmDeps
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
, nodejs
|
|
|
|
, npmHooks
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildPythonPackage rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "esphome-dashboard";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "20240620.0";
|
2024-07-27 06:49:29 +00:00
|
|
|
pyproject = true;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "esphome";
|
|
|
|
repo = "dashboard";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-LmIxfX3rcRK90h31J0B5T02f48MCctFERgXxf0zkDm0=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"esphome_dashboard"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "ESPHome dashboard";
|
|
|
|
homepage = "https://esphome.io/";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|