diff --git a/pkgs/nakarte/map-tiler/default.nix b/pkgs/nakarte/map-tiler/default.nix
index d5af6a9624f693a68efa07b4016ff1827f24b706..b87a831438ff2df4b5d1504aa429c884739df1ad 100644
--- a/pkgs/nakarte/map-tiler/default.nix
+++ b/pkgs/nakarte/map-tiler/default.nix
@@ -4,60 +4,50 @@ , python3Packages
 , fetchFromGitHub
 , gobject-introspection
 , pango
+, thinplatespline
 , maprec
 , ozi_map
 , pyimagequant
+, wrapGAppsHook
 }:
 
 python3Packages.buildPythonApplication rec {
   pname = "map-tiler";
-  version = "2019-10-24";
+  version = "2022-08-06";
 
   src = fetchFromGitHub {
     owner = "wladich";
     repo = "map-tiler";
-    rev = "1dc5be65e58638f5899cd6cdc2010e00ce5e62d4";
-    hash = "sha256-2wDhU1wbvyEAAYUQXUGASmK5X0/XNQF9P2y9pfHhHHg=";
+    rev = "28372c77f73282c234a236ad59672ed28721d88b";
+    hash = "sha256-P5HXWCxxcGX/QRcRVsMAng/aZI0zBjkOgSEyVCjuAYg=";
   };
 
-  patches = [
-    ./gobject.patch
-    ./python3.patch
-  ];
-
   postPatch = ''
-    2to3 -n -w *.py lib/*.py
-    substituteInPlace tiles_update.py \
-      --replace "from . import image_store" "import image_store" \
-      --replace "from .lib" "from lib"
+    substituteInPlace setup.cfg \
+      --replace " @ git+https://github.com/wladich/thinplatespline.git" "" \
+      --replace " @ git+https://github.com/wladich/maprec.git" "" \
+      --replace " @ git+https://github.com/wladich/ozi_map.git" "" \
+      --replace " @ git+https://github.com/wladich/pyimagequant.git" ""
   '';
 
-  nativeBuildInputs = [ gobject-introspection pango ];
+  nativeBuildInputs = [ gobject-introspection wrapGAppsHook ];
 
-  pythonPath = with python3Packages; [
+  buildInputs = [ gobject-introspection pango ];
+
+  propagatedBuildInputs = with python3Packages; [
+    pyyaml
+    pyproj
+    pypng
     pillow
-    purepng
-    pygobject3
     pycairo
+    thinplatespline
     maprec
     ozi_map
     pyimagequant
+    pygobject3
   ];
 
-  dontUseSetuptoolsBuild = true;
-
   doCheck = false;
-
-  installPhase = ''
-    site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages
-    mkdir -p $site_packages
-    cp -r *.py lib $site_packages
-
-    buildPythonPath "$out $pythonPath"
-    makeWrapper $site_packages/tiles_update.py $out/bin/tiles_update \
-      --set PYTHONPATH $site_packages:$program_PYTHONPATH \
-      --set GI_TYPELIB_PATH $GI_TYPELIB_PATH
-  '';
 
   meta = with lib; {
     description = "Raster maps to map tiles";
diff --git a/pkgs/nakarte/map-tiler/gobject.patch b/pkgs/nakarte/map-tiler/gobject.patch
deleted file mode 100644
index ba1d0a817257720489a216e25eaf05a004b107c5..0000000000000000000000000000000000000000
--- a/pkgs/nakarte/map-tiler/gobject.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git i/lib/attribution.py w/lib/attribution.py
-index 1422bb6..1e07064 100644
---- i/lib/attribution.py
-+++ w/lib/attribution.py
-@@ -1,8 +1,11 @@
- # coding: utf-8
- from PIL import Image
- import cairo
--import pango
--import pangocairo
-+import gi
-+gi.require_version('Pango', '1.0')
-+gi.require_version('PangoCairo', '1.0')
-+from gi.repository import Pango as pango
-+from gi.repository import PangoCairo as pangocairo
- import math
- 
- 
-@@ -27,7 +30,7 @@ def check_font_installed():
- 
- 
- def create_path(ctx, text, font_size_px, rotate):
--    check_font_installed()
-+    #check_font_installed()
-     ctx.set_line_width(font_size_px / 5.)
-     ctx.set_line_join(cairo.LINE_JOIN_ROUND)
-     ctx.save()
diff --git a/pkgs/nakarte/map-tiler/python3.patch b/pkgs/nakarte/map-tiler/python3.patch
deleted file mode 100644
index 48a7b5fabbda1987660255ec921f9d32ed7b2ca1..0000000000000000000000000000000000000000
--- a/pkgs/nakarte/map-tiler/python3.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git i/tiles_update.py w/tiles_update.py
-index 2d73b9a..88be9da 100755
---- i/tiles_update.py
-+++ w/tiles_update.py
-@@ -124,10 +124,10 @@ class JobManager(object):
-         fingerprint = maprecord.fingerprint
-         attrib_filename = attribution.get_attrib_path(maprecord.image_path)
-         if os.path.exists(attrib_filename):
--            fingerprint = hashlib.sha1(fingerprint)
--            fingerprint.update(':~:' + open(attrib_filename).read())
-+            fingerprint = hashlib.sha1(str(fingerprint).encode('utf-8'))
-+            fingerprint.update(str(':~:' + open(attrib_filename).read()).encode('utf-8'))
-             info_filename = attribution.get_info_path(maprecord.image_path)
--            fingerprint.update(':~:' + open(info_filename).read())
-+            fingerprint.update(str(':~:' + open(info_filename).read()).encode('utf-8'))
-             fingerprint = fingerprint.hexdigest()
-         return fingerprint
- 
-@@ -225,8 +225,8 @@ def get_reprojected_image(tile_x, tile_y, level, map_reference):
-         src_has_alpha = True
-     cell_size = 64
-     mesh = []
--    for cell_x in xrange(tile_size / cell_size):
--        for cell_y in xrange(tile_size / cell_size):
-+    for cell_x in xrange(int(tile_size / cell_size)):
-+        for cell_y in xrange(int(tile_size / cell_size)):
-             x1 = cell_x * cell_size
-             y1 = cell_y * cell_size
-             x2 = x1 + cell_size
-@@ -370,7 +370,7 @@ def build_overviews(altered_tiles):
- 
- 
- def filename_arg_type(s):
--    return s.decode(sys.getfilesystemencoding())
-+    return s
- 
- 
- def parse_image_format(s):
diff --git a/pkgs/nakarte/maprec/default.nix b/pkgs/nakarte/maprec/default.nix
index 38b7c74e0b8df9df293c2fe9c8a2968b3c914bb8..4ccf0b2394ec70c53d2a9c468ba2e9d64c28d85b 100644
--- a/pkgs/nakarte/maprec/default.nix
+++ b/pkgs/nakarte/maprec/default.nix
@@ -2,18 +2,19 @@ { lib, stdenv, python3Packages, fetchFromGitHub, thinplatespline }:
 
 python3Packages.buildPythonPackage rec {
   pname = "maprec";
-  version = "2019-10-24";
+  version = "2022-08-06";
 
   src = fetchFromGitHub {
     owner = "wladich";
     repo = "maprec";
-    rev = "20f5177cae7454455b21cd5f7178f5639c02d385";
-    hash = "sha256-8lLCzqy4W35/WV83aRnARuAdoBO+977nbuXJfpdOxP8=";
+    rev = "3332183a8010bceba564078cdb05ab6c02ac852e";
+    hash = "sha256-2V1n6XEXPePA5YB8dKlBgTtbL2/2qG2KBdsHbekETXE=";
   };
 
-  patches = [ ./python3.patch ];
-
-  postPatch = "2to3 -n -w maprec/*.py";
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace " @ git+https://github.com/wladich/thinplatespline.git" ""
+  '';
 
   propagatedBuildInputs = with python3Packages; [ pyyaml pyproj thinplatespline ];
 
diff --git a/pkgs/nakarte/maprec/python3.patch b/pkgs/nakarte/maprec/python3.patch
deleted file mode 100644
index a9e37e0fc742ae8c889ed31dba9eaea7312eb385..0000000000000000000000000000000000000000
--- a/pkgs/nakarte/maprec/python3.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git i/maprec/map_record.py w/maprec/map_record.py
-index 2a58b0f..d1ce585 100644
---- i/maprec/map_record.py
-+++ w/maprec/map_record.py
-@@ -161,7 +161,7 @@ class Maprecord(object):
-             data['image_size'] = os.path.getsize(self.image_path)
-             data['image_mtime'] = os.path.getmtime(self.image_path)
-             data = json.dumps(data)
--            self._fingerprint = hashlib.sha1(data).hexdigest()
-+            self._fingerprint = hashlib.sha1(str(data).encode('utf-8')).hexdigest()
-         return self._fingerprint
- 
- #def write(filename, image_path, srs, gcps, cutline=None, image_path_relative=True):
diff --git a/pkgs/nakarte/ozi_map/default.nix b/pkgs/nakarte/ozi_map/default.nix
index 06d45e196f14c1eee8a54068cb04f29c3b498c28..1aeb429213e57b9baf70aed565be7732a0588463 100644
--- a/pkgs/nakarte/ozi_map/default.nix
+++ b/pkgs/nakarte/ozi_map/default.nix
@@ -2,16 +2,19 @@ { lib, stdenv, python3Packages, fetchFromGitHub, maprec }:
 
 python3Packages.buildPythonPackage rec {
   pname = "ozi_map";
-  version = "2019-10-24";
+  version = "2022-08-05";
 
   src = fetchFromGitHub {
     owner = "wladich";
     repo = "ozi_map";
-    rev = "4d6bd3f234960ba90d82e6d58da9c1bf4677eb16";
-    hash = "sha256-sbAKi9GZEPmbI1Nq3l4uSh/tVNLXAY2siXu3YtHI5qo=";
+    rev = "abd9e86d621ef5de89986e92b9e97e54b3173af4";
+    hash = "sha256-leYn+Z0BLptvtmHglwvmhzjHUZh0XEZ9LEBQHDCjfNc=";
   };
 
-  postPatch = "2to3 -n -w ozi_map/*.py";
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace " @ git+https://github.com/wladich/maprec.git" ""
+  '';
 
   propagatedBuildInputs = with python3Packages; [ maprec pyproj ];
 
diff --git a/pkgs/nakarte/pyimagequant/default.nix b/pkgs/nakarte/pyimagequant/default.nix
index 86d8e13d5dfdb98d68c4eec175ec62951ff62ce2..9bcdb7fa309215c9952f5734acf64e44eb127ec0 100644
--- a/pkgs/nakarte/pyimagequant/default.nix
+++ b/pkgs/nakarte/pyimagequant/default.nix
@@ -2,13 +2,13 @@ { lib, stdenv, fetchFromGitHub, python3Packages }:
 
 python3Packages.buildPythonPackage rec {
   pname = "pyimagequant";
-  version = "2019-10-24";
+  version = "2022-06-10";
 
   src = fetchFromGitHub {
     owner = "wladich";
     repo = "pyimagequant";
-    rev = "a467b3b2566f4edd31a272738f7c5e646c0d84a9";
-    hash = "sha256-yBtZsCaFJxPfI8EWyGatepGzE6+1BFUQ2h+ElH9Unqo=";
+    rev = "55a76cb90c75b598d40bd92cf61e6ec9aa846d1e";
+    hash = "sha256-80SsAcN0iEaEEQpNTsi81n71DEQksSYiaSe/LQpqMbc=";
     fetchSubmodules = true;
   };
 
diff --git a/pkgs/nakarte/thinplatespline/default.nix b/pkgs/nakarte/thinplatespline/default.nix
index d2d18c3ed4351daab695a7e6f822c74ccd2ba434..c4a0cdea428fcde3fd087755e48ef724e1ff43bb 100644
--- a/pkgs/nakarte/thinplatespline/default.nix
+++ b/pkgs/nakarte/thinplatespline/default.nix
@@ -2,19 +2,14 @@ { lib, python3Packages, fetchFromGitHub }:
 
 python3Packages.buildPythonPackage rec {
   pname = "thinplatespline";
-  version = "2013-01-23";
+  version = "2022-06-02";
 
   src = fetchFromGitHub {
     owner = "wladich";
     repo = "thinplatespline";
-    rev = "55fecd22c7160577b925e03169e74bd488a41cf3";
-    hash = "sha256-t15iO+3UZKnORiQaYoGD4RLZx2SHtCbjg+Qr+sAHQHY=";
+    rev = "acedd7aa9eef7f66a54df53a9596a0b4d95af92b";
+    hash = "sha256-/RLcB+xq1U7AKx26brw4gG29AMJB1LedC+5MNbK/rxI=";
   };
-
-  postPatch = ''
-    2to3 -n -w tps/*.py
-    substituteInPlace tps/__init__.py --replace "_tps" "._tps"
-  '';
 
   doCheck = false;
 
