2021-03-21 11:14:52 +01:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, curl
|
|
|
|
, qtbase
|
|
|
|
, qtlocation
|
|
|
|
, mapbox-gl-native
|
|
|
|
}:
|
2020-12-28 20:48:24 +01:00
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "mapbox-gl-qml";
|
2021-03-21 11:14:52 +01:00
|
|
|
version = "1.7.6";
|
2020-12-28 20:48:24 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rinigus";
|
|
|
|
repo = "mapbox-gl-qml";
|
|
|
|
rev = version;
|
2021-03-21 11:14:52 +01:00
|
|
|
sha256 = "sha256-E6Pkr8khzDbhmJxzK943+H6cDREgwAqMnJQ3hQWU7fw=";
|
2020-12-28 20:48:24 +01:00
|
|
|
};
|
|
|
|
|
2021-03-21 11:14:52 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ curl qtlocation mapbox-gl-native ];
|
2020-12-28 20:48:24 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-03-21 11:14:52 +01:00
|
|
|
substituteInPlace src/CMakeLists.txt \
|
|
|
|
--replace ' ''${QT_INSTALL_QML}' " $out/${qtbase.qtQmlPrefix}"
|
2020-12-28 20:48:24 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Package expects qt5 subdirectory of mapbox-gl-native to be in the include path
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${mapbox-gl-native}/include/qt5";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Unofficial Mapbox GL Native bindings for Qt QML";
|
|
|
|
homepage = "https://github.com/rinigus/mapbox-gl-qml";
|
|
|
|
license = licenses.lgpl3Only;
|
2021-03-21 11:14:52 +01:00
|
|
|
maintainers = with maintainers; [ Thra11 dotlambda ];
|
2020-12-28 20:48:24 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|