nixpkgs/pkgs/development/python-modules/goodwe/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.0 KiB
Nix
Raw Normal View History

2021-11-21 17:10:04 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, setuptools
2021-11-21 17:10:04 +00:00
}:
buildPythonPackage rec {
pname = "goodwe";
version = "0.2.28";
2021-11-21 17:10:04 +00:00
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "marcelblijleven";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-HkOlvZaCQOt+jbmzal17W5eU7SEq+kzTgbFd3fiTY/A=";
2021-11-21 17:10:04 +00:00
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \
--replace "version: file: VERSION" "version = ${version}"
'';
nativeBuildInputs = [
setuptools
];
2021-11-21 17:10:04 +00:00
pythonImportsCheck = [
"goodwe"
];
nativeCheckInputs = [
pytestCheckHook
];
2021-11-21 17:10:04 +00:00
meta = with lib; {
description = "Python library for connecting to GoodWe inverter";
homepage = "https://github.com/marcelblijleven/goodwe";
changelog = "https://github.com/marcelblijleven/goodwe/releases/tag/v${version}";
2021-11-21 17:10:04 +00:00
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}