From 11804e7aeba177dd239487af8e4d7fdc329be45d Mon Sep 17 00:00:00 2001
From: firefly-cpp <iztok@iztok-jr-fister.eu>
Date: Mon, 19 Sep 2022 10:08:38 +0200
Subject: [PATCH] python310Packages.overpy: init at 0.6

---
 .../python-modules/overpy/default.nix         | 45 +++++++++++++++++++
 pkgs/top-level/python-packages.nix            |  2 +
 2 files changed, 47 insertions(+)
 create mode 100644 pkgs/development/python-modules/overpy/default.nix

diff --git a/pkgs/development/python-modules/overpy/default.nix b/pkgs/development/python-modules/overpy/default.nix
new file mode 100644
index 000000000000..bd50ddb502b6
--- /dev/null
+++ b/pkgs/development/python-modules/overpy/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "overpy";
+  version = "0.6";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "DinoTools";
+    repo = "python-overpy";
+    rev = version;
+    hash = "sha256-Tl+tzxnPASL4J6D/BYCEWhXe/mI12OVgNT5lyby3s7A=";
+  };
+
+  patches = [
+    (fetchpatch {
+      # Remove pytest-runner
+      url = "https://patch-diff.githubusercontent.com/raw/DinoTools/python-overpy/pull/104.patch";
+      hash = "sha256-ScS0vd2P+wyQGyCQV6/4cUcqoQ+S07tGpEovuz9oBMw=";
+    })
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "overpy"
+  ];
+
+  meta = with lib; {
+    description = "Python Wrapper to access the Overpass API";
+    homepage = "https://github.com/DinoTools/python-overpy";
+    license = licenses.mit;
+    maintainers = with maintainers; [ firefly-cpp ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 056263b2f6f3..452847d7a25d 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -6784,6 +6784,8 @@ in {
 
   overly = callPackage ../development/python-modules/overly { };
 
+  overpy = callPackage ../development/python-modules/overpy { };
+
   pandas-stubs = callPackage ../development/python-modules/pandas-stubs { };
 
   parameterizedtestcase = callPackage ../development/python-modules/parameterizedtestcase { };