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