1 { lib, stdenv, fetchFromGitHub, qmake, qtbase, protobuf }:
3 stdenv.mkDerivation rec {
4 pname = "qtpbfimageplugin";
7 src = fetchFromGitHub {
9 repo = "QtPBFImagePlugin";
11 sha256 = "063agzcrcihasqqk2yqxqxg9xknjs99y6vx3n1v7md7dqnfv4iva";
14 nativeBuildInputs = [ qmake ];
15 buildInputs = [ qtbase protobuf ];
17 dontWrapQtApps = true;
21 substituteInPlace pbfplugin.pro \
22 --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
23 '' + lib.optionalString stdenv.isDarwin ''
25 substituteInPlace pbfplugin.pro \
26 --replace '$$PROTOBUF/lib/libprotobuf-lite.a' '${protobuf}/lib/libprotobuf-lite.dylib'
30 description = "Qt image plugin for displaying Mapbox vector tiles";
32 QtPBFImagePlugin is a Qt image plugin that enables applications capable of
33 displaying raster MBTiles maps or raster XYZ online maps to also display PBF
34 vector tiles without (almost) any application modifications.
36 homepage = "https://github.com/tumic0/QtPBFImagePlugin";
37 license = licenses.lgpl3Only;
38 maintainers = with maintainers; [ sikmir ];
39 platforms = platforms.unix;