Files
nixpkgs/pkgs/development/python-modules/omnikinverter/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

61 lines
1.2 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
yarl,
}:
buildPythonPackage rec {
pname = "omnikinverter";
version = "1.0.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-omnikinverter";
tag = "v${version}";
hash = "sha256-W9VeRhsCXLLgOgvJcNNCGNmPvakPtKHAtwQAGtYJbcY=";
};
__darwinAllowLocalNetworking = true;
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace "0.0.0" "${version}"
'';
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
aiohttp
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytestCheckHook
];
pythonImportsCheck = [ "omnikinverter" ];
meta = {
description = "Python module for the Omnik Inverter";
homepage = "https://github.com/klaasnicolaas/python-omnikinverter";
changelog = "https://github.com/klaasnicolaas/python-omnikinverter/releases/tag/v${version}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fab ];
};
}