1{ lib, stdenv, fetchFromGitHub, cmake, doxygen }:
2
3stdenv.mkDerivation rec {
4 pname = "geographiclib";
5 version = "2.2";
6
7 src = fetchFromGitHub {
8 owner = "geographiclib";
9 repo = "geographiclib";
10 rev = "v${version}";
11 hash = "sha256-W2YbeUYr6rjzdufVGzJ1k56uHHMzq8eidDZbRxTyzAU=";
12 };
13
14 nativeBuildInputs = [ cmake doxygen ];
15
16 cmakeFlags = [
17 "-DBUILD_DOCUMENTATION=ON"
18 "-DCMAKE_INSTALL_LIBDIR=lib"
19 ];
20
21 meta = with lib; {
22 description = "C++ geographic library";
23 longDescription = ''
24 GeographicLib is a small C++ library for:
25 * geodesic and rhumb line calculations
26 * conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates
27 * gravity (e.g., EGM2008) and geomagnetic field (e.g., WMM2020) calculations
28 '';
29 homepage = "https://geographiclib.sourceforge.io/";
30 license = licenses.mit;
31 maintainers = with maintainers; [ sikmir ];
32 platforms = platforms.unix;
33 };
34}