2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, which
|
|
|
|
, python3
|
|
|
|
, rsync
|
2023-10-09 19:29:22 +00:00
|
|
|
, wrapQtAppsHook
|
2022-03-30 09:31:56 +00:00
|
|
|
, qtbase
|
2024-01-02 11:29:13 +00:00
|
|
|
, qtpositioning
|
2022-03-30 09:31:56 +00:00
|
|
|
, qtsvg
|
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, zlib
|
|
|
|
, icu
|
|
|
|
, freetype
|
2023-03-15 16:39:30 +00:00
|
|
|
, pugixml
|
|
|
|
, nix-update-script
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
let
|
|
|
|
world_feed_integration_tests_data = fetchFromGitHub {
|
|
|
|
owner = "organicmaps";
|
|
|
|
repo = "world_feed_integration_tests_data";
|
|
|
|
rev = "3b66e59eaae85ebc583ce20baa3bdf27811349c4";
|
|
|
|
hash = "sha256-wOZKqwYxJLllyxCr44rAcropKhohLUIVCtsR5tz9TRw=";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "organicmaps";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2024.03.31-8";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "organicmaps";
|
|
|
|
repo = "organicmaps";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "${version}-android";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-U8tKrL5tnhT/RMvxROk8Q4lO22ylqiMM1QonZ1Rn+CY=";
|
2022-03-30 09:31:56 +00:00
|
|
|
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
|
2022-04-27 09:35:20 +00:00
|
|
|
echo "echo ${lib.replaceStrings ["." "-"] ["" ""] version}" > tools/unix/version.sh
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
# TODO use system boost instead, see https://github.com/organicmaps/organicmaps/issues/5345
|
|
|
|
patchShebangs 3party/boost/tools/build/src/engine/build.sh
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
# Prefetch test data, or the build system will try to fetch it with git.
|
|
|
|
ln -s ${world_feed_integration_tests_data} data/world_feed_integration_tests_data
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
python3
|
|
|
|
rsync
|
2023-10-09 19:29:22 +00:00
|
|
|
wrapQtAppsHook
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Most dependencies are vendored
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
2024-01-02 11:29:13 +00:00
|
|
|
qtpositioning
|
2022-03-30 09:31:56 +00:00
|
|
|
qtsvg
|
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
zlib
|
|
|
|
icu
|
|
|
|
freetype
|
2023-03-15 16:39:30 +00:00
|
|
|
pugixml
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Yes, this is PRE configure. The configure phase uses cmake
|
|
|
|
preConfigure = ''
|
|
|
|
bash ./configure.sh
|
|
|
|
'';
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "-vr" "(.*)-android" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
# darwin: "invalid application of 'sizeof' to a function type"
|
2023-10-09 19:29:22 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://organicmaps.app/";
|
|
|
|
description = "Detailed Offline Maps for Travellers, Tourists, Hikers and Cyclists";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
mainProgram = "OMaps";
|
|
|
|
};
|
|
|
|
}
|