2023-08-10 07:59:29 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch
|
|
|
|
, desktopToDarwinBundle
|
2024-05-15 15:35:15 +00:00
|
|
|
, docbook_xml_dtd_45, docbook_xsl, intltool, itstool, libxslt, pkg-config, wrapGAppsHook3, yelp-tools
|
2021-04-08 16:26:57 +00:00
|
|
|
, curl, gdk-pixbuf, gtk3, json-glib, libxml2
|
|
|
|
, gpsbabel
|
|
|
|
, withGeoClue ? true, geoclue2
|
|
|
|
, withGeoTag ? true, gexiv2
|
|
|
|
, withMagic ? true, file
|
2020-04-24 23:36:52 +00:00
|
|
|
, withMapnik ? false, mapnik
|
|
|
|
, withMBTiles ? true, sqlite
|
|
|
|
, withMd5Hash ? true, nettle
|
2021-04-08 16:26:57 +00:00
|
|
|
, withOAuth ? true, liboauth
|
2023-08-10 07:59:29 +00:00
|
|
|
, withRealtimeGPSTracking ? (!stdenv.isDarwin), gpsd
|
2021-04-08 16:26:57 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "viking";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-04-08 16:26:57 +00:00
|
|
|
url = "mirror://sourceforge/viking/viking-${version}.tar.bz2";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-lFXIlfmLwT3iS9ayNM0PHV7NwbBotMvG62ZE9hJuRaw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +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=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ docbook_xml_dtd_45 docbook_xsl intltool itstool libxslt pkg-config wrapGAppsHook3 yelp-tools ]
|
2023-08-10 07:59:29 +00:00
|
|
|
++ lib.optional stdenv.isDarwin desktopToDarwinBundle;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
buildInputs = [ curl gdk-pixbuf gtk3 json-glib libxml2 ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional withGeoClue geoclue2
|
2021-04-08 16:26:57 +00:00
|
|
|
++ lib.optional withGeoTag gexiv2
|
|
|
|
++ lib.optional withMagic file
|
|
|
|
++ lib.optional withMapnik mapnik
|
|
|
|
++ lib.optional withMBTiles sqlite
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional withMd5Hash nettle
|
2021-04-08 16:26:57 +00:00
|
|
|
++ lib.optional withOAuth liboauth
|
|
|
|
++ lib.optional withRealtimeGPSTracking gpsd;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
2021-01-15 22:18:51 +00:00
|
|
|
(lib.enableFeature withGeoClue "geoclue")
|
2021-04-08 16:26:57 +00:00
|
|
|
(lib.enableFeature withGeoTag "geotag")
|
|
|
|
(lib.enableFeature withMagic "magic")
|
|
|
|
(lib.enableFeature withMapnik "mapnik")
|
2021-01-15 22:18:51 +00:00
|
|
|
(lib.enableFeature withMBTiles "mbtiles")
|
2021-04-08 16:26:57 +00:00
|
|
|
(lib.enableFeature withMd5Hash "nettle")
|
|
|
|
(lib.enableFeature withOAuth "oauth")
|
|
|
|
(lib.enableFeature withRealtimeGPSTracking "realtime-gps-tracking")
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ gpsbabel ]}
|
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GPS data editor and analyzer";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "viking";
|
2020-04-24 23:36:52 +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.
|
|
|
|
'';
|
|
|
|
homepage = "https://sourceforge.net/projects/viking/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ pSub sikmir ];
|
2023-08-10 07:59:29 +00:00
|
|
|
platforms = with platforms; unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|