nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 55 lines 1.4 kB view raw
1{ 2 cmake, 3 fetchFromGitHub, 4 lib, 5 qtlocation, 6 stdenv, 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "maplibre-native-qt"; 11 version = "3.0.0"; 12 13 src = fetchFromGitHub { 14 owner = "maplibre"; 15 repo = "maplibre-native-qt"; 16 tag = "v${finalAttrs.version}"; 17 hash = "sha256-h7PFoGJ5P+k5AEv+y0XReYnPdP/bD4nr/uW9jZ5DCy4="; 18 fetchSubmodules = true; 19 }; 20 21 postPatch = lib.optionals (lib.versionAtLeast qtlocation.version "6.10") '' 22 # fix build with Qt 6.10 23 # included in https://github.com/maplibre/maplibre-native-qt/pull/216 24 substituteInPlace CMakeLists.txt \ 25 --replace-fail 'find_package(Qt''${QT_VERSION_MAJOR} COMPONENTS Location REQUIRED)' \ 26 'find_package(Qt''${QT_VERSION_MAJOR} COMPONENTS Location LocationPrivate REQUIRED)' 27 ''; 28 29 nativeBuildInputs = [ 30 cmake 31 ]; 32 33 env.CXXFLAGS = toString [ 34 "-DQT_NO_USE_NODISCARD_FILE_OPEN" 35 ]; 36 37 buildInputs = [ 38 qtlocation 39 ]; 40 41 dontWrapQtApps = true; # library only 42 43 meta = { 44 changelog = "https://github.com/maplibre/maplibre-native-qt/blob/${finalAttrs.src.rev}/CHANGELOG.md"; 45 description = "MapLibre Native Qt Bindings and Qt Location Plugin"; 46 homepage = "https://github.com/maplibre/maplibre-native-qt"; 47 license = with lib.licenses; [ 48 bsd2 49 gpl3 50 lgpl3 51 ]; 52 maintainers = with lib.maintainers; [ dotlambda ]; 53 platforms = lib.platforms.all; 54 }; 55})