diff options
Diffstat (limited to 'pkgs/development/python-modules/pyaussiebb/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyaussiebb/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyaussiebb/default.nix b/pkgs/development/python-modules/pyaussiebb/default.nix new file mode 100644 index 0000000000000..63edd6e60f8a5 --- /dev/null +++ b/pkgs/development/python-modules/pyaussiebb/default.nix @@ -0,0 +1,53 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, loguru +, poetry-core +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "pyaussiebb"; + version = "0.0.11"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "yaleman"; + repo = "aussiebb"; + rev = "v${version}"; + hash = "sha256-aL+n2ut7n6UUyymMEHoFMhRvK9iFRRunYE9ZirKFXhc="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + requests + loguru + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'requests = "^2.27.1"' 'requests = "*"' + ''; + + # Tests require credentials and requests-testing + doCheck = false; + + pythonImportsCheck = [ + "aussiebb" + ]; + + meta = with lib; { + description = "Module for interacting with the Aussie Broadband APIs"; + homepage = "https://github.com/yaleman/aussiebb"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |