evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / bcg / default.nix
blobf0bf00086818dd8bda4f5cc382d29e9e849abb9b
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
6   appdirs,
7   click,
8   click-log,
9   looseversion,
10   paho-mqtt,
11   pyaml,
12   pyserial,
13   schema,
14   simplejson,
16 buildPythonPackage rec {
17   pname = "bcg";
18   version = "1.17.0";
19   format = "setuptools";
21   src = fetchFromGitHub {
22     owner = "hardwario";
23     repo = "bch-gateway";
24     rev = "v${version}";
25     sha256 = "2Yh5MeIv+BIxjoO9GOPqq7xTAFhyBvnxPy7DeO2FrkI=";
26   };
28   patches = [
29     (fetchpatch { # https://github.com/hardwario/bch-gateway/pull/19
30       name = "bcg-fix-import-with-Python-3.12.patch";
31       url = "https://github.com/hardwario/bch-gateway/pull/19/commits/1314c892992d8914802b6c42602c39f6a1418fca.patch";
32       hash = "sha256-dNiBppXjPSMUe2yiiSc9gGbAc8l4mI41wWq+g7PkD/Y=";
33     })
34   ];
35   postPatch = ''
36     sed -ri 's/@@VERSION@@/${version}/g' \
37       bcg/__init__.py setup.py
38   '';
40   propagatedBuildInputs = [
41     appdirs
42     click
43     click-log
44     looseversion
45     paho-mqtt
46     pyaml
47     pyserial
48     schema
49     simplejson
50   ];
52   pythonImportsCheck = [ "bcg" ];
54   meta = with lib; {
55     homepage = "https://github.com/hardwario/bch-gateway";
56     description = "HARDWARIO Gateway (Python Application «bcg»)";
57     mainProgram = "bcg";
58     platforms = platforms.linux;
59     license = licenses.mit;
60     maintainers = with maintainers; [ cynerd ];
61   };