2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, which
|
|
|
|
, python3
|
|
|
|
, rsync
|
|
|
|
, qtbase
|
|
|
|
, 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
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "organicmaps";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "2023.03.05-5";
|
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";
|
2023-03-15 16:39:30 +00:00
|
|
|
sha256 = "sha256-PfudozmrL8jNS/99nxSn0B3E53W34m4/ZN0y2ucB2WI=";
|
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
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
python3
|
|
|
|
rsync
|
|
|
|
];
|
|
|
|
|
|
|
|
# Most dependencies are vendored
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
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 {
|
|
|
|
attrPath = pname;
|
|
|
|
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"
|
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64) || 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";
|
|
|
|
};
|
|
|
|
}
|