1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 19:26:02 +00:00
nixpkgs/pkgs/servers/home-assistant/esphome.nix

59 lines
1.7 KiB
Nix
Raw Normal View History

2019-10-09 16:46:00 +01:00
{ lib, python3, platformio, esptool, git, protobuf3_7, fetchpatch }:
2019-04-05 09:34:33 +01:00
let
python = python3.override {
packageOverrides = self: super: {
tornado = super.tornado.overridePythonAttrs (oldAttrs: rec {
version = "5.1.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409";
};
});
protobuf = super.protobuf.override {
protobuf = protobuf3_7;
};
};
};
2019-01-10 18:38:38 +00:00
2019-04-05 09:34:33 +01:00
in python.pkgs.buildPythonApplication rec {
2019-01-18 15:13:58 +00:00
pname = "esphome";
2019-10-09 16:46:00 +01:00
version = "1.13.6";
2019-01-10 18:38:38 +00:00
2019-04-05 09:34:33 +01:00
src = python.pkgs.fetchPypi {
2019-01-10 18:38:38 +00:00
inherit pname version;
2019-10-09 16:46:00 +01:00
sha256 = "53148fc43c6cc6736cb7aa4cc1189caa305812061f55289ff916f8bd731ac623";
};
patches = fetchpatch {
url = https://github.com/esphome/esphome/pull/694.patch;
includes = [ "esphome/voluptuous_schema.py" ];
sha256 = "0i2v1d6mcgc94i9rkaqmls7iyfbaisdji41sfc7bh7cf2j824im9";
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
2019-04-05 09:34:33 +01:00
propagatedBuildInputs = with python.pkgs; [
2019-01-10 18:38:38 +00:00
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
];
# 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 globin ];
2019-01-10 18:38:38 +00:00
};
}