1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, appdirs
5, click
6, click-log
7, paho-mqtt
8, pyaml
9, pyserial
10, schema
11, simplejson
12}:
13buildPythonPackage rec {
14 pname = "bcg";
15 version = "1.17.0";
16
17 src = fetchFromGitHub {
18 owner = "hardwario";
19 repo = "bch-gateway";
20 rev = "v${version}";
21 sha256 = "2Yh5MeIv+BIxjoO9GOPqq7xTAFhyBvnxPy7DeO2FrkI=";
22 };
23
24 postPatch = ''
25 sed -ri 's/@@VERSION@@/${version}/g' \
26 bcg/__init__.py setup.py
27 '';
28
29 propagatedBuildInputs = [
30 appdirs
31 click
32 click-log
33 paho-mqtt
34 pyaml
35 pyserial
36 schema
37 simplejson
38 ];
39
40 pythonImportsCheck = [ "bcg" ];
41
42 meta = with lib; {
43 homepage = "https://github.com/hardwario/bch-gateway";
44 description = "HARDWARIO Gateway (Python Application «bcg»)";
45 platforms = platforms.linux;
46 license = licenses.mit;
47 maintainers = with maintainers; [ cynerd ];
48 };
49}