diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-09 18:28:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-12 18:46:15 +0000 |
commit | fd2e737e0678ee7d8081baef05b305146a2c0034 (patch) | |
tree | ac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/development/libraries/mapbox-gl-native | |
parent | cc207d720b6aa836e256c1ee9842bc739e630a8a (diff) | |
parent | 9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff) | |
download | nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2 nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip |
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mapbox-gl-native')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/mapbox-gl-native/default.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/mapbox-gl-native/default.nix b/nixpkgs/pkgs/development/libraries/mapbox-gl-native/default.nix new file mode 100644 index 000000000000..c71bf17a3c77 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/mapbox-gl-native/default.nix @@ -0,0 +1,57 @@ +{ lib, mkDerivation, fetchFromGitHub, fetchpatch, cmake, pkg-config +, qtbase, curl, libuv, glfw3, rapidjson }: + +mkDerivation rec { + pname = "mapbox-gl-native"; + version = "1.6.0"; + + src = fetchFromGitHub { + owner = "mapbox"; + repo = "mapbox-gl-native"; + rev = "maps-v${version}"; + sha256 = "027rw23yvd5a6nl9b5hsanddc44nyb17l2whdcq9fxb9n6vcda4c"; + fetchSubmodules = true; + }; + + patches = [ + # https://github.com/mapbox/mapbox-gl-native/pull/16591 + (fetchpatch { + name = "add-support-for-qmapboxgl-installation.patch"; + url = "https://github.com/mapbox/mapbox-gl-native/commit/e18467d755f470b26f61f6893eddd76ecf0816e6.patch"; + sha256 = "0gs7wmkvyhf2db4cwbsq31sprsh1avi70ggvi32bk0wn3cw4d79b"; + }) + (fetchpatch { + name = "add-support-for-using-qmapboxgl-as-a-proper-cmake-dependency.patch"; + url = "https://github.com/mapbox/mapbox-gl-native/commit/ab27b9b8207754ef731b588d187c470ffb084455.patch"; + sha256 = "1lr5p1g4qaizs57vjqry9aq8k1ki59ks0y975chlnrm2sffp140r"; + }) + (fetchpatch { + name = "skip-license-check.patch"; + url = "https://git.alpinelinux.org/aports/plain/testing/mapbox-gl-native/0002-skip-license-check.patch?id=6751a93dca26b0b3ceec9eb151272253a2fe497e"; + sha256 = "1yybwzxbvn0lqb1br1fyg7763p2h117s6mkmywkl4l7qg9daa7ba"; + }) + ]; + + postPatch = '' + # don't use vendored rapidjson + rm -r vendor/mapbox-base/extras/rapidjson + ''; + + nativeBuildInputs = [ cmake pkg-config ]; + buildInputs = [ curl libuv glfw3 qtbase rapidjson ]; + + cmakeFlags = [ + "-DMBGL_WITH_QT=ON" + "-DMBGL_WITH_QT_LIB_ONLY=ON" + "-DMBGL_WITH_QT_HEADLESS=OFF" + ]; + NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=type-limits"; + + meta = with lib; { + description = "Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL"; + homepage = "https://mapbox.com/mobile"; + license = licenses.bsd2; + maintainers = with maintainers; [ Thra11 dotlambda ]; + platforms = platforms.linux; + }; +} |