1 { lib, stdenv, fetchFromGitHub, qmake, qtbase, protobuf }:
3 stdenv.mkDerivation rec {
4 pname = "qtpbfimageplugin";
7 src = fetchFromGitHub {
9 repo = "QtPBFImagePlugin";
11 sha256 = "sha256-tTpCbHiZTb/xmm3oRXsYAUWl1sYyAlGP9ss4xVQgPVo=";
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/include' '${protobuf}/include' \
27 --replace '$$PROTOBUF/lib/libprotobuf-lite.a' '${protobuf}/lib/libprotobuf-lite.dylib'
31 description = "Qt image plugin for displaying Mapbox vector tiles";
33 QtPBFImagePlugin is a Qt image plugin that enables applications capable of
34 displaying raster MBTiles maps or raster XYZ online maps to also display PBF
35 vector tiles without (almost) any application modifications.
37 homepage = "https://github.com/tumic0/QtPBFImagePlugin";
38 license = licenses.lgpl3Only;
39 maintainers = with maintainers; [ sikmir ];
40 platforms = platforms.unix;