2018-03-18 12:41:14 +00:00
|
|
|
{ stdenv, fetchFromGitHub, gdal, cmake, ninja, proj, clipper, zlib, qtbase, qttools
|
2019-07-05 16:42:08 +01:00
|
|
|
, qtlocation, qtsensors, doxygen, cups, wrapQtAppsHook, qtimageformats
|
2018-03-18 12:41:14 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "OpenOrienteering-Mapper";
|
2019-12-05 07:52:55 +00:00
|
|
|
version = "0.9.1";
|
2018-03-18 12:41:14 +00:00
|
|
|
|
2018-04-06 20:13:47 +01:00
|
|
|
buildInputs = [ gdal qtbase qttools qtlocation qtimageformats
|
|
|
|
qtsensors clipper zlib proj doxygen cups];
|
2018-03-18 12:41:14 +00:00
|
|
|
|
2019-07-05 16:42:08 +01:00
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook ninja ];
|
2018-03-18 12:41:14 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OpenOrienteering";
|
|
|
|
repo = "mapper";
|
|
|
|
rev = "v${version}";
|
2019-12-05 07:52:55 +00:00
|
|
|
sha256 = "1fyhvf2y89hj7wj89kxccx3dqcja6ndy3w4rx1vmzrp246jpz7wb";
|
2018-03-18 12:41:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags =
|
|
|
|
[
|
|
|
|
# Building the manual and bundling licenses fails
|
|
|
|
"-DLICENSING_PROVIDER:BOOL=OFF"
|
|
|
|
"-DMapper_MANUAL_QTHELP:BOOL=OFF"
|
|
|
|
] ++
|
|
|
|
(stdenv.lib.optionals stdenv.isDarwin
|
|
|
|
[
|
|
|
|
# Usually enabled on Darwin
|
|
|
|
"-DCMAKE_FIND_FRAMEWORK=never"
|
|
|
|
# FindGDAL is broken and always finds /Library/Framework unless this is
|
|
|
|
# specified
|
|
|
|
"-DGDAL_INCLUDE_DIR=${gdal}/include"
|
|
|
|
"-DGDAL_CONFIG=${gdal}/bin/gdal-config"
|
|
|
|
"-DGDAL_LIBRARY=${gdal}/lib/libgdal.dylib"
|
|
|
|
# Don't bundle libraries
|
|
|
|
"-DMapper_PACKAGE_PROJ=0"
|
|
|
|
"-DMapper_PACKAGE_QT=0"
|
|
|
|
"-DMapper_PACKAGE_ASSISTANT=0"
|
|
|
|
"-DMapper_PACKAGE_GDAL=0"
|
|
|
|
]);
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
# Fixes "This application failed to start because it could not find or load the Qt
|
|
|
|
# platform plugin "cocoa"."
|
2019-07-05 16:42:08 +01:00
|
|
|
wrapQtApp $out/Mapper.app/Contents/MacOS/Mapper
|
2018-03-18 12:41:14 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper
|
|
|
|
'';
|
|
|
|
|
2018-04-08 18:27:52 +01:00
|
|
|
meta = with stdenv.lib; {
|
2018-03-18 12:41:14 +00:00
|
|
|
description = ''
|
|
|
|
OpenOrienteering Mapper is an orienteering mapmaking program
|
|
|
|
and provides a free alternative to the existing proprietary solution.
|
|
|
|
'';
|
|
|
|
homepage = https://www.openorienteering.org/apps/mapper/;
|
2018-04-08 18:27:52 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2019-09-08 22:48:51 +01:00
|
|
|
maintainers = with maintainers; [ mpickering sikmir ];
|
2018-03-18 12:41:14 +00:00
|
|
|
};
|
|
|
|
}
|