1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, fetchpatch
6, pythonOlder
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "pyfronius";
12 version = "0.7.1";
13
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "nielstron";
18 repo = pname;
19 rev = "release-${version}";
20 sha256 = "1xwx0c1dp2374bwigzwhvcj4577vrxyhn6i5zv73k9ydc7w1xgyz";
21 };
22
23 patches = [
24 (fetchpatch {
25 # Python3.10 compatibility; https://github.com/nielstron/pyfronius/pull/7
26 url = "https://github.com/nielstron/pyfronius/commit/9deb209d4246ff575cd3c4c5373037bf11df6719.patch";
27 hash = "sha256-srXYCvp86kGYUYZIXMcu68hEbkTspD945J+hc/AhqSw=";
28 })
29 ];
30
31 propagatedBuildInputs = [
32 aiohttp
33 ];
34
35 checkInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "pyfronius" ];
40
41 meta = with lib; {
42 description = "Python module to communicate with Fronius Symo";
43 homepage = "https://github.com/nielstron/pyfronius";
44 license = with licenses; [ mit ];
45 maintainers = with maintainers; [ fab ];
46 };
47}