From ad185452bceae94fbaf356cda44f462aaef33685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 27 Oct 2025 11:27:40 -0700 Subject: [PATCH] qt6Packages.maplibre-native-qt: fix build with Qt 6.10 Co-authored-by: aware70 <7832566+aware70@users.noreply.github.com> --- .../libraries/maplibre-native-qt/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/libraries/maplibre-native-qt/default.nix b/pkgs/development/libraries/maplibre-native-qt/default.nix index 89230500a68f..3784356e6a2a 100644 --- a/pkgs/development/libraries/maplibre-native-qt/default.nix +++ b/pkgs/development/libraries/maplibre-native-qt/default.nix @@ -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 ];