2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, qmake, qtbase, protobuf }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "qtpbfimageplugin";
|
2021-01-05 17:05:55 +00:00
|
|
|
version = "2.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tumic0";
|
|
|
|
repo = "QtPBFImagePlugin";
|
|
|
|
rev = version;
|
2021-01-05 17:05:55 +00:00
|
|
|
sha256 = "063agzcrcihasqqk2yqxqxg9xknjs99y6vx3n1v7md7dqnfv4iva";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake ];
|
|
|
|
buildInputs = [ qtbase protobuf ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Fix plugin dir
|
|
|
|
substituteInPlace pbfplugin.pro \
|
|
|
|
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
|
2021-01-05 17:05:55 +00:00
|
|
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
# Fix darwin build
|
|
|
|
substituteInPlace pbfplugin.pro \
|
|
|
|
--replace '$$PROTOBUF/lib/libprotobuf-lite.a' '${protobuf}/lib/libprotobuf-lite.dylib'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Qt image plugin for displaying Mapbox vector tiles";
|
|
|
|
longDescription = ''
|
|
|
|
QtPBFImagePlugin is a Qt image plugin that enables applications capable of
|
|
|
|
displaying raster MBTiles maps or raster XYZ online maps to also display PBF
|
|
|
|
vector tiles without (almost) any application modifications.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/tumic0/QtPBFImagePlugin";
|
2021-01-05 17:05:55 +00:00
|
|
|
license = licenses.lgpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|