diff --git a/pkgs/by-name/or/organicmaps/force-vendored-protobuf.patch b/pkgs/by-name/or/organicmaps/force-vendored-protobuf.patch new file mode 100644 index 000000000000..61f7c6cb7b9e --- /dev/null +++ b/pkgs/by-name/or/organicmaps/force-vendored-protobuf.patch @@ -0,0 +1,24 @@ +diff --git a/3party/CMakeLists.txt b/3party/CMakeLists.txt +index c802251db8..314f4d4543 100644 +--- a/3party/CMakeLists.txt ++++ b/3party/CMakeLists.txt +@@ -33,9 +33,6 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY) + # Add pugixml library. + add_subdirectory(pugixml) + +- # Add protobuf library. +- add_subdirectory(protobuf) +- + add_subdirectory(freetype) + add_subdirectory(icu) + add_subdirectory(harfbuzz) +@@ -45,6 +42,9 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY) + target_include_directories(utf8cpp SYSTEM INTERFACE "${OMIM_ROOT}/3party/utfcpp/source") + endif() + ++# Add protobuf library. ++add_subdirectory(protobuf) ++ + add_subdirectory(agg) + add_subdirectory(bsdiff-courgette) + add_subdirectory(glaze) diff --git a/pkgs/by-name/or/organicmaps/package.nix b/pkgs/by-name/or/organicmaps/package.nix index c797594b6fb2..a94a7935227b 100644 --- a/pkgs/by-name/or/organicmaps/package.nix +++ b/pkgs/by-name/or/organicmaps/package.nix @@ -18,42 +18,32 @@ libxrandr, libxinerama, libxcursor, + gflags, + expat, + jansson, + boost, + fast-float, + utf8cpp, nix-update-script, }: -let - world_feed_integration_tests_data = fetchFromGitHub { - owner = "organicmaps"; - repo = "world_feed_integration_tests_data"; - rev = "30ecb0b3fe694a582edfacc2a7425b6f01f9fec6"; - hash = "sha256-1FF658OhKg8a5kKX/7TVmsxZ9amimn4lB6bX9i7pnI4="; - }; -in stdenv.mkDerivation (finalAttrs: { pname = "organicmaps"; - version = "2026.01.26-11"; + version = "2026.05.27-11"; src = fetchFromGitHub { owner = "organicmaps"; repo = "organicmaps"; tag = "${finalAttrs.version}-android"; - hash = "sha256-EsVPzibUta0cmKA6bYLqCKKij5FWbwPHgMmIs2THpL0="; + hash = "sha256-zLNQk9CCCk3linmAyAT5qsS5GhrOrlSVOdDf5koBwrc="; fetchSubmodules = true; }; - postPatch = '' - # Disable certificate check. It's dependent on time - echo "exit 0" > tools/unix/check_cert.sh - - # crude fix for https://github.com/organicmaps/organicmaps/issues/1862 - echo "echo ${lib.replaceStrings [ "." "-" ] [ "" "" ] finalAttrs.version}" > tools/unix/version.sh - - # TODO use system boost instead, see https://github.com/organicmaps/organicmaps/issues/5345 - patchShebangs 3party/boost/tools/build/src/engine/build.sh - - # Prefetch test data, or the build system will try to fetch it with git. - ln -s ${world_feed_integration_tests_data} data/test_data/world_feed_integration_tests_data - ''; + patches = [ + # Needs the very old protobuf 3.3, so we use the vendored one + # https://github.com/organicmaps/organicmaps/pull/6310 + ./force-vendored-protobuf.patch + ]; nativeBuildInputs = [ cmake @@ -65,7 +55,6 @@ stdenv.mkDerivation (finalAttrs: { qt6.wrapQtAppsHook ]; - # Most dependencies are vendored buildInputs = [ qt6.qtbase qt6.qtpositioning @@ -80,12 +69,21 @@ stdenv.mkDerivation (finalAttrs: { libxrandr libxinerama libxcursor + gflags + expat + jansson + boost + fast-float + utf8cpp ]; - # Yes, this is PRE configure. The configure phase uses cmake - preConfigure = '' - bash ./configure.sh - ''; + cmakeFlags = [ + (lib.cmakeBool "WITH_SYSTEM_PROVIDED_3PARTY" true) + (lib.cmakeBool "SKIP_TESTS" true) + (lib.cmakeBool "SKIP_TOOLS" true) + ]; + + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev utf8cpp}/include/utf8cpp"; passthru = { updateScript = nix-update-script {