1{ lib
2, aiohttp
3, buildPythonPackage
4, click
5, fetchFromGitHub
6, incremental
7, pydantic
8, pythonOlder
9, typer
10}:
11
12buildPythonPackage rec {
13 pname = "ovoenergy";
14 version = "1.3.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "timmo001";
21 repo = pname;
22 rev = "refs/tags/${version}";
23 hash = "sha256-oeNwBmzlkE8JewSwuFG8OYigyispP4xdwO3s2CAcfW4=";
24 };
25
26 nativeBuildInputs = [
27 incremental
28 ];
29
30 postPatch = ''
31 substituteInPlace requirements.txt \
32 --replace "typer==0.6.1" "typer"
33 '';
34
35 propagatedBuildInputs = [
36 aiohttp
37 click
38 pydantic
39 typer
40 ];
41
42 # Project has no tests
43 doCheck = false;
44
45 pythonImportsCheck = [
46 "ovoenergy"
47 ];
48
49 meta = with lib; {
50 description = "Python client for getting data from OVO's API";
51 homepage = "https://github.com/timmo001/ovoenergy";
52 license = licenses.mit;
53 maintainers = with maintainers; [ fab ];
54 };
55}