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