depot/third_party/nixpkgs/pkgs/development/python-modules/goodwe/default.nix
Default email 3e7541c14f Project import generated by Copybara.
GitOrigin-RevId: ff377a78794d412a35245e05428c8f95fef3951f
2022-01-07 12:07:37 +08:00

42 lines
897 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "goodwe";
version = "0.2.10";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "marcelblijleven";
repo = pname;
rev = "v${version}";
sha256 = "1c4wks67vm2dwzmm3xqkidyss04vkx4mpkkr8l1c7c5myfk1n157";
};
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \
--replace "version: file: VERSION" "version = ${version}"
'';
pythonImportsCheck = [
"goodwe"
];
meta = with lib; {
description = "Python library for connecting to GoodWe inverter";
homepage = "https://github.com/marcelblijleven/goodwe";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}