2021-01-11 07:54:33 +00:00
|
|
|
{ fetchurl, fetchpatch, lib, stdenv, makeWrapper
|
2021-01-17 02:09:27 +00:00
|
|
|
, pkg-config, intltool, gettext, gtk2, expat, curl
|
2018-02-25 02:23:58 +00:00
|
|
|
, gpsd, bc, file, gnome-doc-utils, libexif, libxml2, libxslt, scrollkeeper
|
2020-02-03 22:36:02 +00:00
|
|
|
, docbook_xml_dtd_412, gexiv2, gpsbabel, expect
|
|
|
|
, withMapnik ? false, mapnik
|
|
|
|
, withMBTiles ? true, sqlite
|
|
|
|
, withOAuth ? true, liboauth
|
|
|
|
, withMd5Hash ? true, nettle
|
|
|
|
, withGeoClue ? true, geoclue2 }:
|
2009-05-30 21:52:10 +01:00
|
|
|
|
2015-09-06 20:43:27 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "viking";
|
2020-02-03 22:36:02 +00:00
|
|
|
version = "1.8";
|
2009-05-30 21:52:10 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-09-06 20:43:27 +01:00
|
|
|
url = "mirror://sourceforge/viking/viking/viking-${version}.tar.bz2";
|
2020-02-03 22:36:02 +00:00
|
|
|
sha256 = "1a0g0fbj4q5s9p8fv0mqvxws10q3naj81l72sz30vvqpbz6vqp45";
|
2009-05-30 21:52:10 +01:00
|
|
|
};
|
|
|
|
|
2020-02-03 22:36:02 +00:00
|
|
|
patches = [
|
|
|
|
# Fix build without mapnik and sqlite https://github.com/viking-gps/viking/pull/79
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/viking-gps/viking/commit/995feefcb97bdb1590ed018224cf47ce197fe0c1.patch";
|
|
|
|
sha256 = "1xb0b76kg690fag9mw3yfj5k766jmqp1sm8q4f29n1h3nz5g8izd";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-02-25 02:23:58 +00:00
|
|
|
buildInputs = [ makeWrapper intltool gettext gtk2 expat curl gpsd bc file gnome-doc-utils
|
2020-02-03 22:36:02 +00:00
|
|
|
libexif libxml2 libxslt scrollkeeper docbook_xml_dtd_412 gexiv2
|
2021-01-15 05:42:41 +00:00
|
|
|
] ++ lib.optional withMapnik mapnik
|
|
|
|
++ lib.optional withGeoClue geoclue2
|
|
|
|
++ lib.optional withMd5Hash nettle
|
|
|
|
++ lib.optional withOAuth liboauth
|
|
|
|
++ lib.optional withMBTiles sqlite;
|
2009-05-30 22:32:01 +01:00
|
|
|
|
2020-02-03 22:36:02 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-scrollkeeper"
|
2021-01-15 05:42:41 +00:00
|
|
|
(lib.enableFeature withMapnik "mapnik")
|
|
|
|
(lib.enableFeature withGeoClue "geoclue")
|
|
|
|
(lib.enableFeature withMd5Hash "nettle")
|
|
|
|
(lib.enableFeature withOAuth "oauth")
|
|
|
|
(lib.enableFeature withMBTiles "mbtiles")
|
2020-02-03 22:36:02 +00:00
|
|
|
];
|
2012-07-01 16:32:03 +01:00
|
|
|
|
2015-09-06 20:43:27 +01:00
|
|
|
preBuild = ''
|
|
|
|
sed -i help/Makefile \
|
|
|
|
-e 's|--noout|--noout --nonet --path "${scrollkeeper}/share/xml/scrollkeeper/dtds"|g'
|
|
|
|
sed -i help/Makefile -e 's|--postvalid||g'
|
|
|
|
'';
|
2009-05-30 21:52:10 +01:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2015-09-06 20:43:27 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/viking \
|
2016-01-03 14:39:52 +00:00
|
|
|
--prefix PATH : "${gpsbabel}/bin" \
|
|
|
|
--prefix PATH : "${expect}/bin"
|
2015-09-06 20:43:27 +01:00
|
|
|
'';
|
2009-05-30 21:52:10 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-09-06 20:43:27 +01:00
|
|
|
description = "GPS data editor and analyzer";
|
2009-05-30 21:52:10 +01: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 02:11:51 +01:00
|
|
|
homepage = "https://sourceforge.net/projects/viking/";
|
2015-09-06 20:43:27 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2020-02-03 22:36:02 +00:00
|
|
|
maintainers = with maintainers; [ pSub sikmir ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = with platforms; linux;
|
2009-05-30 21:52:10 +01:00
|
|
|
};
|
|
|
|
}
|