2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchpatch
|
2021-07-14 22:03:04 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyfronius";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "0.7.1";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nielstron";
|
|
|
|
repo = pname;
|
2021-08-22 07:53:02 +00:00
|
|
|
rev = "release-${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "1xwx0c1dp2374bwigzwhvcj4577vrxyhn6i5zv73k9ydc7w1xgyz";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# Python3.10 compatibility; https://github.com/nielstron/pyfronius/pull/7
|
|
|
|
url = "https://github.com/nielstron/pyfronius/commit/9deb209d4246ff575cd3c4c5373037bf11df6719.patch";
|
|
|
|
hash = "sha256-srXYCvp86kGYUYZIXMcu68hEbkTspD945J+hc/AhqSw=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyfronius" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to communicate with Fronius Symo";
|
|
|
|
homepage = "https://github.com/nielstron/pyfronius";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|