2022-02-03 08:24:56 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, loguru
|
2022-03-16 08:52:05 +00:00
|
|
|
, pydantic
|
2022-02-05 21:58:31 +00:00
|
|
|
, poetry-core
|
|
|
|
, pythonOlder
|
2022-02-03 08:24:56 +00:00
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyaussiebb";
|
2022-03-24 07:18:03 +00:00
|
|
|
version = "0.0.15";
|
2022-02-05 21:58:31 +00:00
|
|
|
format = "pyproject";
|
2022-02-03 08:24:56 +00:00
|
|
|
|
2022-02-05 21:58:31 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2022-02-03 08:24:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yaleman";
|
|
|
|
repo = "aussiebb";
|
|
|
|
rev = "v${version}";
|
2022-03-24 07:18:03 +00:00
|
|
|
hash = "sha256-V9yN05Bkv5vkHgXZ77ps3d6JS39M5iMuiijOGRBFi0U=";
|
2022-02-03 08:24:56 +00:00
|
|
|
};
|
|
|
|
|
2022-02-05 21:58:31 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2022-02-03 08:24:56 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
requests
|
|
|
|
loguru
|
2022-03-16 08:52:05 +00:00
|
|
|
pydantic
|
2022-02-03 08:24:56 +00:00
|
|
|
];
|
|
|
|
|
2022-02-05 21:58:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'requests = "^2.27.1"' 'requests = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Tests require credentials and requests-testing
|
2022-02-03 08:24:56 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|