Files
nixpkgs/pkgs/development/python-modules/odp-amsterdam/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

63 lines
1.2 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pythonOlder,
pytest-asyncio,
pytestCheckHook,
pytz,
syrupy,
}:
buildPythonPackage rec {
pname = "odp-amsterdam";
version = "6.1.2";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-odp-amsterdam";
tag = "v${version}";
hash = "sha256-vamWelyEcwvYI5I9wmKk8kKc7j0OMer/BKgC0pbN4g0=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"0.0.0"' '"${version}"'
sed -i '/addopts/d' pyproject.toml
'';
build-system = [
poetry-core
];
pythonRelaxDeps = [ "pytz" ];
dependencies = [
aiohttp
pytz
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "odp_amsterdam" ];
meta = {
description = "Python client for getting garage occupancy in Amsterdam";
homepage = "https://github.com/klaasnicolaas/python-odp-amsterdam";
changelog = "https://github.com/klaasnicolaas/python-odp-amsterdam/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}