From aea30151067eeb733bf932d6bc16ee033c08bcfb Mon Sep 17 00:00:00 2001 From: Ivan Mincik Date: Mon, 3 Aug 2026 15:00:38 +0200 Subject: [PATCH] qgis: replace spatialite path patch with substituteInPlace Replace hard to maintain patch with simple, more self-describing substituteInPlace patch. --- pkgs/applications/gis/qgis/unwrapped.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index c3ace3ca108f..0a53e69ca588 100644 --- a/pkgs/applications/gis/qgis/unwrapped.nix +++ b/pkgs/applications/gis/qgis/unwrapped.nix @@ -5,7 +5,6 @@ fetchFromGitHub, lndir, makeWrapper, - replaceVars, wrapGAppsHook3, wrapQtAppsHook, @@ -99,6 +98,12 @@ stdenv.mkDerivation rec { hash = "sha256-tdZNSA6kZHwS96YRbN7YF+ODPJrnINa/QGCo8pw196I="; }; + postPatch = '' + substituteInPlace python/utils.py \ + --replace-fail '("mod_spatialite", "sqlite3_modspatialite_init")' \ + '("${libspatialite}/lib/mod_spatialite${stdenv.hostPlatform.extensions.sharedLibrary}", "sqlite3_modspatialite_init")' + ''; + passthru = { inherit pythonBuildInputs; inherit py; @@ -160,12 +165,6 @@ stdenv.mkDerivation rec { ] ++ pythonBuildInputs; - patches = [ - (replaceVars ./spatialite-path.patch { - spatialiteLib = "${libspatialite}/lib/mod_spatialite${stdenv.hostPlatform.extensions.sharedLibrary}"; - }) - ]; - # Add path to Qt platform plugins # (offscreen is needed by "${APIS_SRC_DIR}/generate_console_pap.py") env.QT_QPA_PLATFORM_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}/platforms";