nixos/kubernetes/kubelet: Fix sandbox image load on containerd 2.x (#364558)
[NixPkgs.git] / pkgs / tools / misc / esphome / dashboard.nix
blob23747aed378768d02f3a72261c8d95a52009c348
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchNpmDeps,
7   # build-system
8   setuptools,
9   nodejs,
10   npmHooks,
14 buildPythonPackage rec {
15   pname = "esphome-dashboard";
16   version = "20241120.0";
17   pyproject = true;
19   src = fetchFromGitHub {
20     owner = "esphome";
21     repo = "dashboard";
22     rev = "refs/tags/${version}";
23     hash = "sha256-insoDWHqMFAGgmsY2ZgNuo1cl0WGJXRy398bt3ADORs=";
24   };
26   npmDeps = fetchNpmDeps {
27     inherit src;
28     hash = "sha256-UKrF7yzyj09WBrmrJ6uzcRjIYrKwCqLQ5paiqnt/Xuc=";
29   };
31   build-system = [ setuptools ];
33   nativeBuildInputs = [
34     nodejs
35     npmHooks.npmConfigHook
36   ];
38   postPatch = ''
39     # https://github.com/esphome/dashboard/pull/639
40     patchShebangs script/build
41   '';
43   preBuild = ''
44     script/build
45   '';
47   # no tests
48   doCheck = false;
50   pythonImportsCheck = [
51     "esphome_dashboard"
52   ];
54   meta = with lib; {
55     description = "ESPHome dashboard";
56     homepage = "https://esphome.io/";
57     license = with licenses; [ asl20 ];
58     maintainers = with maintainers; [ hexa ];
59   };