Unverified Commit bdbb65c3 authored by dotlambda's avatar dotlambda Committed by GitHub
Browse files

qt6Packages.maplibre-native-qt: fix build with Qt 6.10 (#456271)

parents 1014b658 ad185452
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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
  ];