From 79b015d9a21447cd3e93364897e4b3f850fda71d Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 4 Jul 2019 08:30:50 -0700 Subject: [PATCH] pythonPackages.geoip2: init at 2.9.0 --- .../python-modules/geoip2/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/python-modules/geoip2/default.nix diff --git a/pkgs/development/python-modules/geoip2/default.nix b/pkgs/development/python-modules/geoip2/default.nix new file mode 100644 index 000000000000..97371d1b65a2 --- /dev/null +++ b/pkgs/development/python-modules/geoip2/default.nix @@ -0,0 +1,29 @@ +{ buildPythonPackage, lib, fetchPypi, isPy27 +, ipaddress +, maxminddb +, mock +, requests +, requests-mock +}: + +buildPythonPackage rec { + version = "2.9.0"; + pname = "geoip2"; + + src = fetchPypi { + inherit pname version; + sha256 = "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"; + }; + + propagatedBuildInputs = [ requests maxminddb ] + ++ lib.optionals isPy27 [ ipaddress ]; + + checkInputs = [ requests-mock ]; + + meta = with lib; { + description = "MaxMind GeoIP2 API"; + homepage = "https://www.maxmind.com/en/home"; + license = licenses.apsl20; + maintainers = with maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0b264cd759ed..2ec132264a99 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -446,6 +446,8 @@ in { genanki = callPackage ../development/python-modules/genanki { }; + geoip2 = callPackage ../development/python-modules/geoip2 { }; + gidgethub = callPackage ../development/python-modules/gidgethub { }; gin-config = callPackage ../development/python-modules/gin-config { };