qgis: replace spatialite path patch with substituteInPlace

Replace hard to maintain patch with simple, more self-describing
substituteInPlace patch.
This commit is contained in:
Ivan Mincik
2026-08-03 15:00:38 +02:00
parent 79385e7caa
commit aea3015106

View File

@@ -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";