nixpkgs/pkgs/applications/misc/viking/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

83 lines
2.7 KiB
Nix
Raw Normal View History

2023-08-05 22:46:45 +00:00
{ lib, stdenv, fetchurl, fetchpatch
, desktopToDarwinBundle
, docbook_xml_dtd_45, docbook_xsl, intltool, itstool, libxslt, pkg-config, wrapGAppsHook3, yelp-tools
2021-04-05 17:55:31 +00:00
, 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
}:
2015-09-06 19:43:27 +00:00
stdenv.mkDerivation rec {
pname = "viking";
2021-11-29 22:23:01 +00:00
version = "1.10";
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=";
};
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 wrapGAppsHook3 yelp-tools ]
2023-08-05 22:46:45 +00:00
++ 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;
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" ];
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
'';
meta = with lib; {
2015-09-06 19:43:27 +00:00
description = "GPS data editor and analyzer";
mainProgram = "viking";
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/";
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;
};
}