2021-06-04 09:07:49 +00:00
|
|
|
{ lib
|
2022-03-05 16:20:37 +00:00
|
|
|
, aiohttp
|
2023-01-11 07:51:40 +00:00
|
|
|
, aresponses
|
2021-06-04 09:07:49 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-02-10 20:34:41 +00:00
|
|
|
, poetry-core
|
2022-03-05 16:20:37 +00:00
|
|
|
, pythonOlder
|
2023-01-11 07:51:40 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2023-08-22 20:05:09 +00:00
|
|
|
, pytz
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-01-11 07:51:40 +00:00
|
|
|
pname = "odp-amsterdam";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "5.3.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "klaasnicolaas";
|
2023-01-11 07:51:40 +00:00
|
|
|
repo = "python-odp-amsterdam";
|
2022-07-18 16:21:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-HesAg6hJ8Al/ZZRBTXZM0EVv1kjYmmA66W+crwtWhf4=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '"0.0.0"' '"${version}"'
|
2023-01-11 07:51:40 +00:00
|
|
|
sed -i '/addopts/d' pyproject.toml
|
2022-02-10 20:34:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2023-08-22 20:05:09 +00:00
|
|
|
pytz
|
2021-06-04 09:07:49 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pythonImportsCheck = [
|
2023-01-11 07:51:40 +00:00
|
|
|
"odp_amsterdam"
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for getting garage occupancy in Amsterdam";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://github.com/klaasnicolaas/python-odp-amsterdam";
|
|
|
|
changelog = "https://github.com/klaasnicolaas/python-odp-amsterdam/releases/tag/v${version}";
|
2021-06-04 09:07:49 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|