From 480f0263caaaabd75211befd2e9c4b175cb191ae Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 24 Jan 2021 21:54:49 +0100 Subject: [PATCH 1/3] python3Packages.haversine: init at 2.3.0 --- .../python-modules/haversine/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/haversine/default.nix diff --git a/pkgs/development/python-modules/haversine/default.nix b/pkgs/development/python-modules/haversine/default.nix new file mode 100644 index 00000000000..7f5e462d1b3 --- /dev/null +++ b/pkgs/development/python-modules/haversine/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "haversine"; + version = "2.3.0"; + + src = fetchFromGitHub { + owner = "mapado"; + repo = pname; + rev = "v${version}"; + sha256 = "1c3yf9162b2b7l1lsw3ffd1linnc542qvljpgwxp6y5arrmljqnv"; + }; + + checkInputs = [ + numpy + pytestCheckHook + ]; + + pythonImportsCheck = [ "haversine" ]; + + meta = with lib; { + description = "Python module the distance between 2 points on earth"; + homepage = "https://github.com/mapado/haversine"; + 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 d37d837e4e1..1cee8907aab 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2859,6 +2859,8 @@ in { hatasmota = callPackage ../development/python-modules/hatasmota { }; + haversine = callPackage ../development/python-modules/haversine { }; + hawkauthlib = callPackage ../development/python-modules/hawkauthlib { }; hbmqtt = callPackage ../development/python-modules/hbmqtt { }; From 55f568bf56b90b27e5d3abfe859e065b18851428 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 24 Jan 2021 22:29:05 +0100 Subject: [PATCH 2/3] python3Packages.geojson-client: init at 0.5 --- .../python-modules/geojson-client/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/geojson-client/default.nix diff --git a/pkgs/development/python-modules/geojson-client/default.nix b/pkgs/development/python-modules/geojson-client/default.nix new file mode 100644 index 00000000000..7e683e20483 --- /dev/null +++ b/pkgs/development/python-modules/geojson-client/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, geojson +, haversine +, pytz +, requests +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "geojson-client"; + version = "0.5"; + + src = fetchFromGitHub { + owner = "exxamalte"; + repo = "python-geojson-client"; + rev = "v${version}"; + sha256 = "1cc6ymbn45dv7xdl1r8bbizlmsdbxjmsfza442yxmmm19nxnnqjv"; + }; + + propagatedBuildInputs = [ + geojson + haversine + pytz + requests + ]; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "geojson_client" ]; + + meta = with lib; { + description = "Python module for convenient access to GeoJSON feeds"; + homepage = "https://github.com/exxamalte/python-geojson-client"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1cee8907aab..ad4be313e8f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2502,6 +2502,8 @@ in { geojson = callPackage ../development/python-modules/geojson { }; + geojson-client = callPackage ../development/python-modules/geojson-client { }; + geopandas = callPackage ../development/python-modules/geopandas { }; geopy = if isPy3k then From 39011226480bf7018feca534ff5e04205c7953c0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 24 Jan 2021 22:29:23 +0100 Subject: [PATCH 3/3] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 0f0737595af..4527394a120 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -292,7 +292,7 @@ "generic" = ps: with ps; [ ]; "generic_thermostat" = ps: with ps; [ ]; "geniushub" = ps: with ps; [ ]; # missing inputs: geniushub-client - "geo_json_events" = ps: with ps; [ ]; # missing inputs: geojson_client + "geo_json_events" = ps: with ps; [ geojson-client ]; "geo_location" = ps: with ps; [ ]; "geo_rss_events" = ps: with ps; [ ]; # missing inputs: georss_generic_client "geofency" = ps: with ps; [ aiohttp-cors ]; @@ -885,7 +885,7 @@ "uptime" = ps: with ps; [ ]; "uptimerobot" = ps: with ps; [ ]; # missing inputs: pyuptimerobot "uscis" = ps: with ps; [ ]; # missing inputs: uscisstatus - "usgs_earthquakes_feed" = ps: with ps; [ ]; # missing inputs: geojson_client + "usgs_earthquakes_feed" = ps: with ps; [ geojson-client ]; "utility_meter" = ps: with ps; [ ]; "uvc" = ps: with ps; [ uvcclient ]; "vacuum" = ps: with ps; [ ];