From 883d08f11617e532a51c1c156daa599ce2687ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 14 Dec 2022 22:12:25 -0800 Subject: [PATCH] python310Packages.here-transit: init at 1.2.0 --- .../python-modules/here-transit/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/here-transit/default.nix diff --git a/pkgs/development/python-modules/here-transit/default.nix b/pkgs/development/python-modules/here-transit/default.nix new file mode 100644 index 000000000000..cd4418263398 --- /dev/null +++ b/pkgs/development/python-modules/here-transit/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, poetry-core +, aiohttp +, async-timeout +, yarl +, aresponses +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "here-transit"; + version = "1.2.0"; + + disabled = pythonOlder "3.8"; + + format = "pyproject"; + + src = fetchFromGitHub { + owner = "eifinger"; + repo = "here_transit"; + rev = "v${version}"; + hash = "sha256-C5HZZCmK9ILUUXyx1i/cUggSM3xbOzXiJ13hrT2DWAI="; + }; + + postPatch = '' + sed -i "/^addopts/d" pyproject.toml + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + async-timeout + yarl + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "here_transit" ]; + + meta = { + changelog = "https://github.com/eifinger/here_transit/blob/${src.rev}/CHANGELOG.md"; + description = "Asynchronous Python client for the HERE Routing V8 API"; + homepage = "https://github.com/eifinger/here_transit"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ebff84904711..0fbf573882a4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4214,6 +4214,8 @@ self: super: with self; { here-routing = callPackage ../development/python-modules/here-routing { }; + here-transit = callPackage ../development/python-modules/here-transit { }; + herepy = callPackage ../development/python-modules/herepy { }; hetzner = callPackage ../development/python-modules/hetzner { };