about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-01-25 02:11:35 +0100
committerGitHub <noreply@github.com>2021-01-25 02:11:35 +0100
commitb82e56a80ab02b1cd9c66d5b13c104957531a4f3 (patch)
tree8d378363db0c567e30f0dc960663ede1e63f7f16 /pkgs/development/python-modules
parented788bc0bc69ca1b1bcce9d1eaf63fd443548559 (diff)
parent39011226480bf7018feca534ff5e04205c7953c0 (diff)
downloadnixlib-b82e56a80ab02b1cd9c66d5b13c104957531a4f3.tar
nixlib-b82e56a80ab02b1cd9c66d5b13c104957531a4f3.tar.gz
nixlib-b82e56a80ab02b1cd9c66d5b13c104957531a4f3.tar.bz2
nixlib-b82e56a80ab02b1cd9c66d5b13c104957531a4f3.tar.lz
nixlib-b82e56a80ab02b1cd9c66d5b13c104957531a4f3.tar.xz
nixlib-b82e56a80ab02b1cd9c66d5b13c104957531a4f3.tar.zst
nixlib-b82e56a80ab02b1cd9c66d5b13c104957531a4f3.zip
Merge pull request #110720 from fabaff/geojson_client
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/geojson-client/default.nix39
-rw-r--r--pkgs/development/python-modules/haversine/default.nix32
2 files changed, 71 insertions, 0 deletions
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 000000000000..7e683e204834
--- /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/development/python-modules/haversine/default.nix b/pkgs/development/python-modules/haversine/default.nix
new file mode 100644
index 000000000000..7f5e462d1b3c
--- /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 ];
+  };
+}