nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 desktopToDarwinBundle,
6 docbook_xml_dtd_45,
7 docbook_xsl,
8 intltool,
9 itstool,
10 libxslt,
11 pkg-config,
12 wrapGAppsHook3,
13 xxd,
14 yelp-tools,
15 curl,
16 gdk-pixbuf,
17 gtk3,
18 json-glib,
19 libnova,
20 libxml2,
21 gpsbabel,
22 withGeoClue ? true,
23 geoclue2,
24 withGeoTag ? true,
25 gexiv2,
26 withMagic ? true,
27 file,
28 withMapnik ? false,
29 mapnik,
30 withMBTiles ? true,
31 sqlite,
32 withMd5Hash ? true,
33 nettle,
34 withOAuth ? true,
35 liboauth,
36 withRealtimeGPSTracking ? (!stdenv.hostPlatform.isDarwin),
37 gpsd,
38 xz,
39}:
40
41stdenv.mkDerivation (finalAttrs: {
42 pname = "viking";
43 version = "1.11";
44
45 src = fetchurl {
46 url = "mirror://sourceforge/viking/viking-${finalAttrs.version}.tar.bz2";
47 hash = "sha256-/iHVwRHvIId9HNlbGkvDT6rp3ToXuskj9BjhJxo8/JE=";
48 };
49
50 nativeBuildInputs = [
51 docbook_xml_dtd_45
52 docbook_xsl
53 intltool
54 itstool
55 libxslt
56 pkg-config
57 wrapGAppsHook3
58 xxd
59 yelp-tools
60 ]
61 ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle;
62
63 buildInputs = [
64 curl
65 gdk-pixbuf
66 gtk3
67 json-glib
68 libnova
69 libxml2
70 xz # liblzma
71 ]
72 ++ lib.optional withGeoClue geoclue2
73 ++ lib.optional withGeoTag gexiv2
74 ++ lib.optional withMagic file
75 ++ lib.optional withMapnik mapnik
76 ++ lib.optional withMBTiles sqlite
77 ++ lib.optional withMd5Hash nettle
78 ++ lib.optional withOAuth liboauth
79 ++ lib.optional withRealtimeGPSTracking gpsd;
80
81 configureFlags = [
82 (lib.enableFeature withGeoClue "geoclue")
83 (lib.enableFeature withGeoTag "geotag")
84 (lib.enableFeature withMagic "magic")
85 (lib.enableFeature withMapnik "mapnik")
86 (lib.enableFeature withMBTiles "mbtiles")
87 (lib.enableFeature withMd5Hash "nettle")
88 (lib.enableFeature withOAuth "oauth")
89 (lib.enableFeature withRealtimeGPSTracking "realtime-gps-tracking")
90 ];
91
92 doCheck = true;
93
94 preFixup = ''
95 gappsWrapperArgs+=(
96 --prefix PATH : ${lib.makeBinPath [ gpsbabel ]}
97 )
98 '';
99
100 meta = {
101 description = "GPS data editor and analyzer";
102 mainProgram = "viking";
103 longDescription = ''
104 Viking is a free/open source program to manage GPS data. You
105 can import and plot tracks and waypoints, show Openstreetmaps
106 and/or Terraserver maps under it, download geocaches for an area
107 on the map, make new tracks and waypoints, see real-time GPS
108 position, etc.
109 '';
110 homepage = "https://sourceforge.net/projects/viking/";
111 license = lib.licenses.gpl2Plus;
112 maintainers = with lib.maintainers; [
113 pSub
114 sikmir
115 ];
116 platforms = with lib.platforms; unix;
117 };
118})