Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
42 lines
1.3 KiB
Nix
42 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitHub, qmake, qtbase, protobuf }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "qtpbfimageplugin";
|
|
version = "3.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tumic0";
|
|
repo = "QtPBFImagePlugin";
|
|
rev = version;
|
|
sha256 = "sha256-RbGVjwVIwO6Rj/hbNEowtZLqJdtkTfnq5YdnEYnbkTM=";
|
|
};
|
|
|
|
nativeBuildInputs = [ qmake ];
|
|
buildInputs = [ qtbase protobuf ];
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
postPatch = ''
|
|
# Fix plugin dir
|
|
substituteInPlace pbfplugin.pro \
|
|
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
|
|
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
# Fix darwin build
|
|
substituteInPlace pbfplugin.pro \
|
|
--replace '$$PROTOBUF/include' '${protobuf}/include' \
|
|
--replace '$$PROTOBUF/lib/libprotobuf-lite.a' '${protobuf}/lib/libprotobuf-lite.dylib'
|
|
'';
|
|
|
|
meta = with 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";
|
|
license = licenses.lgpl3Only;
|
|
maintainers = with maintainers; [ sikmir ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|