2022-03-27 13:15:15 +03:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, which
|
|
|
|
, python3
|
|
|
|
, rsync
|
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, zlib
|
|
|
|
, icu
|
|
|
|
, freetype
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "organicmaps";
|
2022-11-25 17:00:47 +03:00
|
|
|
version = "2022.11.24-3";
|
2022-03-27 13:15:15 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "organicmaps";
|
|
|
|
repo = "organicmaps";
|
2022-04-27 09:44:21 +03:00
|
|
|
rev = "${version}-android";
|
2022-11-25 17:00:47 +03:00
|
|
|
sha256 = "sha256-4RW7/sCtOXxA8n0Jx4ksNGRg7r8ErujmyzbnA1pi6ng=";
|
2022-03-27 13:15:15 +03: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:44:21 +03:00
|
|
|
echo "echo ${lib.replaceStrings ["." "-"] ["" ""] version}" > tools/unix/version.sh
|
2022-03-27 13:15:15 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
python3
|
|
|
|
rsync
|
|
|
|
];
|
|
|
|
|
|
|
|
# Most dependencies are vendored
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
zlib
|
|
|
|
icu
|
|
|
|
freetype
|
|
|
|
];
|
|
|
|
|
|
|
|
# Yes, this is PRE configure. The configure phase uses cmake
|
|
|
|
preConfigure = ''
|
|
|
|
bash ./configure.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-29 12:37:28 +03:00
|
|
|
# darwin: "invalid application of 'sizeof' to a function type"
|
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
2022-03-27 13:15:15 +03: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";
|
|
|
|
};
|
|
|
|
}
|