Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / omnikinverter / default.nix
blob4d9a2c97c5663fd79a29821accb5aaa4321fea63
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , poetry-core
7 , pytest-asyncio
8 , pytestCheckHook
9 , pythonOlder
10 , yarl
13 buildPythonPackage rec {
14   pname = "omnikinverter";
15   version = "1.0.0";
16   pyproject = true;
18   disabled = pythonOlder "3.11";
20   src = fetchFromGitHub {
21     owner = "klaasnicolaas";
22     repo = "python-omnikinverter";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-W9VeRhsCXLLgOgvJcNNCGNmPvakPtKHAtwQAGtYJbcY=";
25   };
27   __darwinAllowLocalNetworking = true;
29   postPatch = ''
30     # Upstream doesn't set a version for the pyproject.toml
31     substituteInPlace pyproject.toml \
32       --replace "0.0.0" "${version}" \
33       --replace "--cov" ""
34   '';
36   nativeBuildInputs = [
37     poetry-core
38   ];
40   propagatedBuildInputs = [
41     aiohttp
42     yarl
43   ];
45   nativeCheckInputs = [
46     aresponses
47     pytest-asyncio
48     pytestCheckHook
49   ];
51   pythonImportsCheck = [
52     "omnikinverter"
53   ];
55   meta = with lib; {
56     description = "Python module for the Omnik Inverter";
57     homepage = "https://github.com/klaasnicolaas/python-omnikinverter";
58     changelog = "https://github.com/klaasnicolaas/python-omnikinverter/releases/tag/v${version}";
59     license = with licenses; [ mit ];
60     maintainers = with maintainers; [ fab ];
61   };