2021-02-25 19:12:25 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, qmake
|
|
|
|
, qttools
|
|
|
|
, qttranslations
|
|
|
|
, gdal
|
|
|
|
, proj
|
|
|
|
, qtsvg
|
2021-06-06 22:33:24 +01:00
|
|
|
, qtwebengine
|
2021-02-25 19:12:25 +00:00
|
|
|
, withGeoimage ? true, exiv2
|
|
|
|
, withGpsdlib ? (!stdenv.isDarwin), gpsd
|
|
|
|
, withLibproxy ? false, libproxy
|
|
|
|
, withZbar ? false, zbar
|
|
|
|
}:
|
2010-06-13 20:32:04 +01:00
|
|
|
|
2020-12-12 11:25:00 +00:00
|
|
|
mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "merkaartor";
|
2021-06-06 22:33:24 +01:00
|
|
|
version = "0.19.0";
|
2016-06-26 08:03:58 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openstreetmap";
|
|
|
|
repo = "merkaartor";
|
2020-12-12 11:25:00 +00:00
|
|
|
rev = version;
|
2021-08-31 20:12:16 +01:00
|
|
|
sha256 = "sha256-I3QNCXzwhEFa8aOdwl3UJV8MLZ9caN9wuaaVrGFRvbQ=";
|
2010-06-13 20:32:04 +01:00
|
|
|
};
|
|
|
|
|
2021-02-25 19:12:25 +00:00
|
|
|
nativeBuildInputs = [ qmake qttools ];
|
|
|
|
|
2021-06-06 22:33:24 +01:00
|
|
|
buildInputs = [ gdal proj qtsvg qtwebengine ]
|
2021-02-25 19:12:25 +00:00
|
|
|
++ lib.optional withGeoimage exiv2
|
|
|
|
++ lib.optional withGpsdlib gpsd
|
|
|
|
++ lib.optional withLibproxy libproxy
|
|
|
|
++ lib.optional withZbar zbar;
|
2010-06-13 20:32:04 +01:00
|
|
|
|
2021-02-25 19:12:25 +00:00
|
|
|
preConfigure = ''
|
|
|
|
lrelease src/src.pro
|
|
|
|
'';
|
2016-04-17 00:33:35 +01:00
|
|
|
|
2021-06-06 22:33:24 +01:00
|
|
|
qmakeFlags = [
|
|
|
|
"TRANSDIR_SYSTEM=${qttranslations}/translations"
|
|
|
|
"USEWEBENGINE=1"
|
|
|
|
] ++ lib.optional withGeoimage "GEOIMAGE=1"
|
2021-02-25 19:12:25 +00:00
|
|
|
++ lib.optional withGpsdlib "GPSDLIB=1"
|
|
|
|
++ lib.optional withLibproxy "LIBPROXY=1"
|
|
|
|
++ lib.optional withZbar "ZBAR=1";
|
2017-10-01 02:22:41 +01:00
|
|
|
|
2021-02-25 19:12:25 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv binaries/bin/merkaartor.app $out/Applications
|
|
|
|
mv binaries/bin/plugins $out/Applications/merkaartor.app/Contents
|
|
|
|
'';
|
2019-07-11 12:58:46 +01:00
|
|
|
|
2020-12-12 11:25:00 +00:00
|
|
|
meta = with lib; {
|
2017-10-01 02:22:41 +01:00
|
|
|
description = "OpenStreetMap editor";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://merkaartor.be/";
|
2017-10-01 02:22:41 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2021-02-25 19:12:25 +00:00
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
platforms = platforms.unix;
|
2010-06-13 20:32:04 +01:00
|
|
|
};
|
|
|
|
}
|