From e955576b43e56cb30a6ccbebef0f7fa25effe80e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 17 Jun 2019 06:09:16 +0000 Subject: [PATCH 1/2] merkaartor: fix build Merkaartor is not compatible with current version of Qt5 (5.12) but is known to work with version 5.9 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fecf53c3f4d..78a47b668be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18986,7 +18986,7 @@ in mercurialFull = appendToName "full" (pkgs.mercurial.override { guiSupport = true; }); - merkaartor = libsForQt5.callPackage ../applications/misc/merkaartor { }; + merkaartor = libsForQt59.callPackage ../applications/misc/merkaartor { }; meshlab = libsForQt5.callPackage ../applications/graphics/meshlab { }; From 462c43881a4a74932c403005b501d7243c6a131b Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 17 Jun 2019 16:00:42 +0000 Subject: [PATCH 2/2] merkaartor: fix run-time loading of Qt 5 platform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this patch, running merkaartor fails with the following message: “This application failed to start because it could not find or load the Qt platform plugin "xcb"”. --- pkgs/applications/misc/merkaartor/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/merkaartor/default.nix b/pkgs/applications/misc/merkaartor/default.nix index 70a6efb90dd..0833464f2c2 100644 --- a/pkgs/applications/misc/merkaartor/default.nix +++ b/pkgs/applications/misc/merkaartor/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qmake, pkgconfig, boost, gdal, proj +{ stdenv, fetchFromGitHub, makeWrapper, qmake, pkgconfig, boost, gdal, proj , qtbase, qtsvg, qtwebkit }: stdenv.mkDerivation rec { @@ -12,12 +12,17 @@ stdenv.mkDerivation rec { sha256 = "0ls3q8m1hxiwyrypy6qca8wczhl4969ncl0sszfdwfv70rzxjk88"; }; - nativeBuildInputs = [ qmake pkgconfig ]; + nativeBuildInputs = [ makeWrapper qmake pkgconfig ]; buildInputs = [ boost gdal proj qtbase qtsvg qtwebkit ]; enableParallelBuilding = true; + postInstall = '' + wrapProgram $out/bin/merkaartor \ + --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms + ''; + meta = with stdenv.lib; { description = "OpenStreetMap editor"; homepage = http://merkaartor.be/;