Files
nixpkgs/pkgs/development/python-modules/goodwe/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

44 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "goodwe";
version = "0.4.8";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "marcelblijleven";
repo = "goodwe";
tag = "v${version}";
hash = "sha256-EsMv4hzGsAV9OTFo2b/omM4hx7XxUcdO6rrMzQ3DmNQ=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \
--replace-fail "version: file: VERSION" "version = ${version}"
'';
build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "goodwe" ];
meta = {
description = "Python library for connecting to GoodWe inverter";
homepage = "https://github.com/marcelblijleven/goodwe";
changelog = "https://github.com/marcelblijleven/goodwe/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}