2023-08-05 22:46:45 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch
|
|
|
|
, desktopToDarwinBundle
|
2021-04-05 17:55:31 +00:00
|
|
|
, docbook_xml_dtd_45, docbook_xsl, intltool, itstool, libxslt, pkg-config, wrapGAppsHook, yelp-tools
|
|
|
|
, curl, gdk-pixbuf, gtk3, json-glib, libxml2
|
|
|
|
, gpsbabel
|
|
|
|
, withGeoClue ? true, geoclue2
|
|
|
|
, withGeoTag ? true, gexiv2
|
|
|
|
, withMagic ? true, file
|
2020-02-03 22:36:02 +00:00
|
|
|
, withMapnik ? false, mapnik
|
|
|
|
, withMBTiles ? true, sqlite
|
|
|
|
, withMd5Hash ? true, nettle
|
2021-04-05 17:55:31 +00:00
|
|
|
, withOAuth ? true, liboauth
|
2023-08-05 22:46:45 +00:00
|
|
|
, withRealtimeGPSTracking ? (!stdenv.isDarwin), gpsd
|
2021-04-05 17:55:31 +00:00
|
|
|
}:
|
2009-05-30 20:52:10 +00:00
|
|
|
|
2015-09-06 19:43:27 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "viking";
|
2021-11-29 22:23:01 +00:00
|
|
|
version = "1.10";
|
2009-05-30 20:52:10 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-04-05 17:55:31 +00:00
|
|
|
url = "mirror://sourceforge/viking/viking-${version}.tar.bz2";
|
2021-11-29 22:23:01 +00:00
|
|
|
sha256 = "sha256-lFXIlfmLwT3iS9ayNM0PHV7NwbBotMvG62ZE9hJuRaw=";
|
2009-05-30 20:52:10 +00:00
|
|
|
};
|
|
|
|
|
2023-08-05 22:46:45 +00:00
|
|
|
patches = [
|
|
|
|
# Fix check_md5_hash.sh on macOS
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/viking-gps/viking/pull/184/commits/b0e110a3cfefea0f1874669525eb3a220dd29f9f.patch";
|
|
|
|
hash = "sha256-HdkcZMV570SXOQMIZZAti2HT0gIdF/EwQCVXBaOwpqs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ docbook_xml_dtd_45 docbook_xsl intltool itstool libxslt pkg-config wrapGAppsHook yelp-tools ]
|
|
|
|
++ lib.optional stdenv.isDarwin desktopToDarwinBundle;
|
2020-02-03 22:36:02 +00:00
|
|
|
|
2021-04-05 17:55:31 +00:00
|
|
|
buildInputs = [ curl gdk-pixbuf gtk3 json-glib libxml2 ]
|
2021-01-15 05:42:41 +00:00
|
|
|
++ lib.optional withGeoClue geoclue2
|
2021-04-05 17:55:31 +00:00
|
|
|
++ lib.optional withGeoTag gexiv2
|
|
|
|
++ lib.optional withMagic file
|
|
|
|
++ lib.optional withMapnik mapnik
|
|
|
|
++ lib.optional withMBTiles sqlite
|
2021-01-15 05:42:41 +00:00
|
|
|
++ lib.optional withMd5Hash nettle
|
2021-04-05 17:55:31 +00:00
|
|
|
++ lib.optional withOAuth liboauth
|
|
|
|
++ lib.optional withRealtimeGPSTracking gpsd;
|
2009-05-30 21:32:01 +00:00
|
|
|
|
2020-02-03 22:36:02 +00:00
|
|
|
configureFlags = [
|
2021-01-15 05:42:41 +00:00
|
|
|
(lib.enableFeature withGeoClue "geoclue")
|
2021-04-05 17:55:31 +00:00
|
|
|
(lib.enableFeature withGeoTag "geotag")
|
|
|
|
(lib.enableFeature withMagic "magic")
|
|
|
|
(lib.enableFeature withMapnik "mapnik")
|
2021-01-15 05:42:41 +00:00
|
|
|
(lib.enableFeature withMBTiles "mbtiles")
|
2021-04-05 17:55:31 +00:00
|
|
|
(lib.enableFeature withMd5Hash "nettle")
|
|
|
|
(lib.enableFeature withOAuth "oauth")
|
|
|
|
(lib.enableFeature withRealtimeGPSTracking "realtime-gps-tracking")
|
2020-02-03 22:36:02 +00:00
|
|
|
];
|
2012-07-01 15:32:03 +00:00
|
|
|
|
2021-04-05 17:55:31 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2009-05-30 20:52:10 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-04-05 17:55:31 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ gpsbabel ]}
|
|
|
|
)
|
2015-09-06 19:43:27 +00:00
|
|
|
'';
|
2009-05-30 20:52:10 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-09-06 19:43:27 +00:00
|
|
|
description = "GPS data editor and analyzer";
|
2009-05-30 20:52:10 +00:00
|
|
|
longDescription = ''
|
|
|
|
Viking is a free/open source program to manage GPS data. You
|
|
|
|
can import and plot tracks and waypoints, show Openstreetmaps
|
|
|
|
and/or Terraserver maps under it, download geocaches for an area
|
|
|
|
on the map, make new tracks and waypoints, see real-time GPS
|
|
|
|
position, etc.
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://sourceforge.net/projects/viking/";
|
2015-09-06 19:43:27 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-02-03 22:36:02 +00:00
|
|
|
maintainers = with maintainers; [ pSub sikmir ];
|
2023-08-05 22:46:45 +00:00
|
|
|
platforms = with platforms; unix;
|
2009-05-30 20:52:10 +00:00
|
|
|
};
|
|
|
|
}
|