1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 loguru,
7 pydantic,
8 poetry-core,
9 pythonOlder,
10 requests,
11}:
12
13buildPythonPackage rec {
14 pname = "pyaussiebb";
15 version = "0.1.1";
16 pyproject = true;
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "yaleman";
22 repo = "aussiebb";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-XNf9vYMlTLqhYIVNw9GjPcXpOm5EYCcC4aGukR8g3zc=";
25 };
26
27 nativeBuildInputs = [ poetry-core ];
28
29 propagatedBuildInputs = [
30 aiohttp
31 requests
32 loguru
33 pydantic
34 ];
35
36 postPatch = ''
37 substituteInPlace pyproject.toml \
38 --replace 'requests = "^2.27.1"' 'requests = "*"'
39 '';
40
41 # Tests require credentials and requests-testing
42 doCheck = false;
43
44 pythonImportsCheck = [ "aussiebb" ];
45
46 meta = with lib; {
47 description = "Module for interacting with the Aussie Broadband APIs";
48 homepage = "https://github.com/yaleman/aussiebb";
49 changelog = "https://github.com/yaleman/pyaussiebb/blob/v${version}/CHANGELOG.md";
50 license = with licenses; [ mit ];
51 maintainers = with maintainers; [ fab ];
52 };
53}