2023-08-07 18:09:02 +00:00
|
|
|
{ lib
|
2021-02-25 19:12:25 +00:00
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-08-07 18:09:02 +00:00
|
|
|
, fetchpatch
|
2023-10-06 19:31:50 +00:00
|
|
|
, cmake
|
|
|
|
, pkg-config
|
2021-02-25 19:12:25 +00:00
|
|
|
, qttools
|
2023-08-07 18:09:02 +00:00
|
|
|
, wrapQtAppsHook
|
2021-02-25 19:12:25 +00:00
|
|
|
, gdal
|
|
|
|
, proj
|
|
|
|
, qtsvg
|
2021-06-06 21:33:24 +00: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 19:32:04 +00:00
|
|
|
|
2023-08-07 18:09:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "merkaartor";
|
2021-06-06 21:33:24 +00:00
|
|
|
version = "0.19.0";
|
2016-06-26 07:03:58 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openstreetmap";
|
|
|
|
repo = "merkaartor";
|
2020-12-12 11:25:00 +00:00
|
|
|
rev = version;
|
2023-08-07 18:09:02 +00:00
|
|
|
hash = "sha256-I3QNCXzwhEFa8aOdwl3UJV8MLZ9caN9wuaaVrGFRvbQ=";
|
2010-06-13 19:32:04 +00:00
|
|
|
};
|
|
|
|
|
2023-08-07 18:09:02 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "exiv2-0.28.patch";
|
|
|
|
url = "https://github.com/openstreetmap/merkaartor/commit/1e20d2ccd743ea5f8c2358e4ae36fead8b9390fd.patch";
|
|
|
|
hash = "sha256-aHjJLKYvqz7V0QwUIg0SbentBe+DaCJusVqy4xRBVWo=";
|
|
|
|
})
|
2023-10-06 19:31:50 +00:00
|
|
|
# https://github.com/openstreetmap/merkaartor/pull/290
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/openstreetmap/merkaartor/commit/7dede77370d89e8e7586f6ed5af225f9b5bde6cf.patch";
|
|
|
|
hash = "sha256-3oDRPysVNvA50t/b9xOcVQgac3U1lDPrencanl4c6Zk=";
|
|
|
|
})
|
2023-08-07 18:09:02 +00:00
|
|
|
];
|
|
|
|
|
2023-10-06 19:31:50 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
|
2021-02-25 19:12:25 +00:00
|
|
|
|
2021-06-06 21:33:24 +00: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 19:32:04 +00:00
|
|
|
|
2023-10-06 19:31:50 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
(lib.cmakeBool "GEOIMAGE" withGeoimage)
|
|
|
|
(lib.cmakeBool "GPSD" withGpsdlib)
|
|
|
|
(lib.cmakeBool "LIBPROXY" withLibproxy)
|
|
|
|
(lib.cmakeBool "WEBENGINE" true)
|
|
|
|
(lib.cmakeBool "ZBAR" withZbar)
|
|
|
|
];
|
2017-10-01 01:22:41 +00:00
|
|
|
|
2021-02-25 19:12:25 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2023-10-06 19:31:50 +00:00
|
|
|
mkdir -p $out/{Applications,bin}
|
|
|
|
mv $out/merkaartor.app $out/Applications
|
|
|
|
makeWrapper $out/{Applications/merkaartor.app/Contents/MacOS,bin}/merkaartor
|
2021-02-25 19:12:25 +00:00
|
|
|
'';
|
2019-07-11 11:58:46 +00:00
|
|
|
|
2020-12-12 11:25:00 +00:00
|
|
|
meta = with lib; {
|
2017-10-01 01:22:41 +00:00
|
|
|
description = "OpenStreetMap editor";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://merkaartor.be/";
|
2017-10-01 01:22:41 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2023-10-06 19:31:50 +00:00
|
|
|
mainProgram = "merkaartor";
|
2021-02-25 19:12:25 +00:00
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
platforms = platforms.unix;
|
2010-06-13 19:32:04 +00:00
|
|
|
};
|
|
|
|
}
|