qt6Packages.maplibre-native-qt: fix build with Qt 6.10

Co-authored-by: aware70 <7832566+aware70@users.noreply.github.com>
This commit is contained in:
Robert Schütz
2025-11-11 09:23:32 -08:00
co-authored by aware70
parent 97718d275b
commit ad185452bc
@@ -18,10 +18,22 @@ stdenv.mkDerivation (finalAttrs: {
fetchSubmodules = true;
};
postPatch = lib.optionals (lib.versionAtLeast qtlocation.version "6.10") ''
# fix build with Qt 6.10
# included in https://github.com/maplibre/maplibre-native-qt/pull/216
substituteInPlace CMakeLists.txt \
--replace-fail 'find_package(Qt''${QT_VERSION_MAJOR} COMPONENTS Location REQUIRED)' \
'find_package(Qt''${QT_VERSION_MAJOR} COMPONENTS Location LocationPrivate REQUIRED)'
'';
nativeBuildInputs = [
cmake
];
env.CXXFLAGS = toString [
"-DQT_NO_USE_NODISCARD_FILE_OPEN"
];
buildInputs = [
qtlocation
];