2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, qmake, qtbase, protobuf }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "qtpbfimageplugin";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tumic0";
|
|
|
|
repo = "QtPBFImagePlugin";
|
|
|
|
rev = version;
|
2024-07-01 15:47:52 +00:00
|
|
|
sha256 = "sha256-7DaJvpApdnh5+9vd0spUDorwzpzLEaJ8477qE8nJLOc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake ];
|
|
|
|
buildInputs = [ qtbase protobuf ];
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Fix plugin dir
|
|
|
|
substituteInPlace pbfplugin.pro \
|
|
|
|
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
|
2024-09-26 11:04:55 +00:00
|
|
|
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
# Fix darwin build
|
|
|
|
substituteInPlace pbfplugin.pro \
|
2022-12-17 10:02:37 +00:00
|
|
|
--replace '$$PROTOBUF/include' '${protobuf}/include' \
|
2020-04-24 23:36:52 +00:00
|
|
|
--replace '$$PROTOBUF/lib/libprotobuf-lite.a' '${protobuf}/lib/libprotobuf-lite.dylib'
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|