1 { lib, stdenv, fetchurl, fetchpatch
2 , desktopToDarwinBundle
3 , docbook_xml_dtd_45, docbook_xsl, intltool, itstool, libxslt, pkg-config, wrapGAppsHook3, yelp-tools
4 , curl, gdk-pixbuf, gtk3, json-glib, libxml2
6 , withGeoClue ? true, geoclue2
7 , withGeoTag ? true, gexiv2
8 , withMagic ? true, file
9 , withMapnik ? false, mapnik
10 , withMBTiles ? true, sqlite
11 , withMd5Hash ? true, nettle
12 , withOAuth ? true, liboauth
13 , withRealtimeGPSTracking ? (!stdenv.hostPlatform.isDarwin), gpsd
16 stdenv.mkDerivation rec {
21 url = "mirror://sourceforge/viking/viking-${version}.tar.bz2";
22 sha256 = "sha256-lFXIlfmLwT3iS9ayNM0PHV7NwbBotMvG62ZE9hJuRaw=";
26 # Fix check_md5_hash.sh on macOS
28 url = "https://github.com/viking-gps/viking/pull/184/commits/b0e110a3cfefea0f1874669525eb3a220dd29f9f.patch";
29 hash = "sha256-HdkcZMV570SXOQMIZZAti2HT0gIdF/EwQCVXBaOwpqs=";
33 nativeBuildInputs = [ docbook_xml_dtd_45 docbook_xsl intltool itstool libxslt pkg-config wrapGAppsHook3 yelp-tools ]
34 ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle;
36 buildInputs = [ curl gdk-pixbuf gtk3 json-glib libxml2 ]
37 ++ lib.optional withGeoClue geoclue2
38 ++ lib.optional withGeoTag gexiv2
39 ++ lib.optional withMagic file
40 ++ lib.optional withMapnik mapnik
41 ++ lib.optional withMBTiles sqlite
42 ++ lib.optional withMd5Hash nettle
43 ++ lib.optional withOAuth liboauth
44 ++ lib.optional withRealtimeGPSTracking gpsd;
47 (lib.enableFeature withGeoClue "geoclue")
48 (lib.enableFeature withGeoTag "geotag")
49 (lib.enableFeature withMagic "magic")
50 (lib.enableFeature withMapnik "mapnik")
51 (lib.enableFeature withMBTiles "mbtiles")
52 (lib.enableFeature withMd5Hash "nettle")
53 (lib.enableFeature withOAuth "oauth")
54 (lib.enableFeature withRealtimeGPSTracking "realtime-gps-tracking")
57 hardeningDisable = [ "format" ];
63 --prefix PATH : ${lib.makeBinPath [ gpsbabel ]}
68 description = "GPS data editor and analyzer";
69 mainProgram = "viking";
71 Viking is a free/open source program to manage GPS data. You
72 can import and plot tracks and waypoints, show Openstreetmaps
73 and/or Terraserver maps under it, download geocaches for an area
74 on the map, make new tracks and waypoints, see real-time GPS
77 homepage = "https://sourceforge.net/projects/viking/";
78 license = licenses.gpl2Plus;
79 maintainers = with maintainers; [ pSub sikmir ];
80 platforms = with platforms; unix;