diff --git a/pkgs/development/python-modules/geopy/default.nix b/pkgs/development/python-modules/geopy/default.nix index fdf478d1610..693a4221ee0 100644 --- a/pkgs/development/python-modules/geopy/default.nix +++ b/pkgs/development/python-modules/geopy/default.nix @@ -1,30 +1,42 @@ -{ lib, stdenv +{ lib +, async_generator , buildPythonPackage , fetchFromGitHub -, isPy3k , geographiclib +, isPy3k +, pytestCheckHook }: buildPythonPackage rec { - pname = "geopy-unstable"; - version = "2019-11-10"; - + pname = "geopy"; + version = "2.1.0"; disabled = !isPy3k; # only Python 3 - doCheck = false; # Needs network access + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "0239a4achk49ngagb6aqy6cgzfwgbxir07vwi13ysbpx78y0l4g9"; + }; propagatedBuildInputs = [ geographiclib ]; - src = fetchFromGitHub { - owner = "geopy"; - repo = "geopy"; - rev = "531b7de6126838a3e69370227aa7f2086ba52b89"; - sha256 = "07l1pblzg3hb3dbvd9rq8x78ly5dv0zxbc5hwskqil0bhv5v1p39"; - }; + checkInputs = [ + async_generator + pytestCheckHook + ]; + + # Exclude tests which perform API calls + pytestFlagsArray = [ "--ignore test/geocoders/" ]; + pythonImportsCheck = [ "geopy" ]; + + __darwinAllowLocalNetworking = true; meta = with lib; { homepage = "https://github.com/geopy/geopy"; description = "Python Geocoding Toolbox"; - license = licenses.mit; - maintainers = with maintainers; [GuillaumeDesforges]; + changelog = "https://github.com/geopy/geopy/releases/tag/${version}"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ GuillaumeDesforges ]; }; } diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4487da38c4c..411506fe177 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -39,7 +39,7 @@ "apns" = ps: with ps; [ ]; # missing inputs: apns2 "apple_tv" = ps: with ps; [ aiohttp-cors netdisco pyatv zeroconf ]; "apprise" = ps: with ps; [ apprise ]; - "aprs" = ps: with ps; [ ]; # missing inputs: aprslib geopy + "aprs" = ps: with ps; [ geopy ]; # missing inputs: aprslib "aqualogic" = ps: with ps; [ ]; # missing inputs: aqualogic "aquostv" = ps: with ps; [ ]; # missing inputs: sharp_aquos_rc "arcam_fmj" = ps: with ps; [ ]; # missing inputs: arcam-fmj