nixpkgs/pkgs/servers/home-assistant/esphome.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2019-01-18 15:13:58 +00:00
{ lib, python3, fetchpatch, platformio, esptool, git }:
2019-01-10 18:38:38 +00:00
python3.pkgs.buildPythonApplication rec {
2019-01-18 15:13:58 +00:00
pname = "esphome";
2019-02-26 23:17:07 +00:00
version = "1.11.2";
2019-01-10 18:38:38 +00:00
src = python3.pkgs.fetchPypi {
inherit pname version;
2019-02-26 23:17:07 +00:00
sha256 = "0kg8fqv3mv8i852jr42p4mipa9wjlzjwj60j1r2zpgzgr8p8wfs8";
2019-01-10 18:38:38 +00:00
};
2019-01-18 15:13:58 +00:00
ESPHOME_USE_SUBPROCESS = "";
2019-01-10 18:38:38 +00:00
propagatedBuildInputs = with python3.pkgs; [
voluptuous pyyaml paho-mqtt colorlog
2019-01-18 15:13:58 +00:00
tornado protobuf tzlocal pyserial ifaddr
];
makeWrapperArgs = [
# platformio is used in esphomeyaml/platformio_api.py
# esptool is used in esphomeyaml/__main__.py
# git is used in esphomeyaml/writer.py
"--prefix PATH : ${lib.makeBinPath [ platformio esptool git ]}"
"--set ESPHOME_USE_SUBPROCESS ''"
2019-01-10 18:38:38 +00:00
];
checkPhase = ''
$out/bin/esphomeyaml tests/test1.yaml compile
$out/bin/esphomeyaml tests/test2.yaml compile
'';
# Platformio will try to access the network
doCheck = false;
meta = with lib; {
description = "Make creating custom firmwares for ESP32/ESP8266 super easy";
2019-01-18 15:13:58 +00:00
homepage = https://esphome.io/;
2019-01-10 18:38:38 +00:00
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}