1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, setuptools 5, wheel 6, aiohttp 7}: 8 9buildPythonPackage rec { 10 pname = "esphome-dashboard-api"; 11 version = "1.2.3"; 12 format = "pyproject"; 13 14 src = fetchFromGitHub { 15 owner = "esphome"; 16 repo = "dashboard-api"; 17 rev = "refs/tags/${version}"; 18 hash = "sha256-RFfS0xzRXoM6ETXmviiMPxffPzspjTqpkvHOlTJXN9g="; 19 }; 20 21 postPatch = '' 22 substituteInPlace pyproject.toml \ 23 --replace "setuptools~=65.6" "setuptools" \ 24 --replace "wheel~=0.37.1" "wheel" 25 ''; 26 27 nativeBuildInputs = [ 28 setuptools 29 wheel 30 ]; 31 32 propagatedBuildInputs = [ 33 aiohttp 34 ]; 35 36 doCheck = false; # no tests 37 38 pythonImportsCheck = [ 39 "esphome_dashboard_api" 40 ]; 41 42 meta = with lib; { 43 description = "API to interact with ESPHome Dashboard"; 44 homepage = "https://github.com/esphome/dashboard-api"; 45 changelog = "https://github.com/esphome/dashboard-api/releases/tag/${version}"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ hexa ]; 48 }; 49}