mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
qgis: replace spatialite path patch with substituteInPlace
Replace hard to maintain patch with simple, more self-describing substituteInPlace patch.
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user