2021-06-04 09:07:49 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2022-02-10 20:34:41 +00:00
|
|
|
, poetry-core
|
2021-06-04 09:07:49 +00:00
|
|
|
, aiohttp
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "garages-amsterdam";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "3.2.1";
|
|
|
|
format = "pyproject";
|
2021-06-04 09:07:49 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "klaasnicolaas";
|
|
|
|
repo = "garages_amsterdam";
|
2022-02-10 20:34:41 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "16f2742r9p3mrg2nz8lnkgsxabbjga2qnp9vzq59026q6mmfwkm9";
|
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;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "garages_amsterdam" ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|