2021-06-04 09:07:49 +00:00
|
|
|
{ lib
|
2022-03-05 16:20:37 +00:00
|
|
|
, aiohttp
|
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
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "garages-amsterdam";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "4.1.0";
|
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";
|
|
|
|
repo = "garages_amsterdam";
|
2022-07-18 16:21:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-ZWp543msRAgn/fFplEt6saSNbZ2flC5gwjxrll4w0W0=";
|
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}"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
|
|
|
|
# The only test requires network access
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"garages_amsterdam"
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for getting garage occupancy in Amsterdam";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://github.com/klaasnicolaas/python-garages-amsterdam";
|
2021-06-04 09:07:49 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|