Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / energyzero / default.nix
blob0c99ced94a1389c5bc71f0d6db95fc7af1c2679d
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , poetry-core
7 , pytest-asyncio
8 , pytest-freezer
9 , pytestCheckHook
10 , pythonOlder
11 , yarl
14 buildPythonPackage rec {
15   pname = "energyzero";
16   version = "2.1.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.11";
21   src = fetchFromGitHub {
22     owner = "klaasnicolaas";
23     repo = "python-energyzero";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-NZbCiLCZC+hTcV0twOeCoKKD3eZ0/ZzPTnVpFyMLSfw=";
26   };
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace '"0.0.0"' '"${version}"' \
31       --replace 'addopts = "--cov"' ""
32   '';
34   nativeBuildInputs = [
35     poetry-core
36   ];
38   propagatedBuildInputs = [
39     aiohttp
40     yarl
41   ];
43   nativeCheckInputs = [
44     aresponses
45     pytest-asyncio
46     pytest-freezer
47     pytestCheckHook
48   ];
50   pythonImportsCheck = [
51     "energyzero"
52   ];
54   meta = with lib; {
55     description = "Module for getting the dynamic prices from EnergyZero";
56     homepage = "https://github.com/klaasnicolaas/python-energyzero";
57     changelog = "https://github.com/klaasnicolaas/python-energyzero/releases/tag/v${version}";
58     license = with licenses; [ mit ];
59     maintainers = with maintainers; [ fab ];
60   };