From 0476c760b738c3d0e259e7333aad5e039eb246c5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 20 Jun 2021 10:20:59 +0200 Subject: [PATCH] python3Packages.geocachingapi: init at 0.1.0 --- .../python-modules/geocachingapi/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/geocachingapi/default.nix diff --git a/pkgs/development/python-modules/geocachingapi/default.nix b/pkgs/development/python-modules/geocachingapi/default.nix new file mode 100644 index 000000000000..952457c5360d --- /dev/null +++ b/pkgs/development/python-modules/geocachingapi/default.nix @@ -0,0 +1,44 @@ +{ lib +, aiohttp +, backoff +, buildPythonPackage +, fetchFromGitHub +, setuptools-scm +, yarl +}: + +buildPythonPackage rec { + pname = "geocachingapi"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "Sholofly"; + repo = "geocachingapi-python"; + rev = version; + sha256 = "1vdknsxd7rvw6g5lwxlxj97l9ic8cch8rdki3aczs6xzw5adxhcs"; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + propagatedBuildInputs = [ + aiohttp + backoff + yarl + ]; + + # Tests require a token and network access + doCheck = false; + + pythonImportsCheck = [ "geocachingapi" ]; + + meta = with lib; { + description = "Python API to control the Geocaching API"; + homepage = "https://github.com/Sholofly/geocachingapi-python"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 78db6b3db5c9..019c238f187f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2820,6 +2820,8 @@ in { geoalchemy2 = callPackage ../development/python-modules/geoalchemy2 { }; + geocachingapi = callPackage ../development/python-modules/geocachingapi { }; + geographiclib = callPackage ../development/python-modules/geographiclib { }; geoip2 = callPackage ../development/python-modules/geoip2 { };