mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
esphome: build dashboard from source
This commit is contained in:
parent
ff58909840
commit
32c08ba0ca
@ -1,19 +1,48 @@
|
||||
{ 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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user