2021-01-04 12:55:48 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, libusb1, qtbase, zlib, IOKit, which, expat }:
|
2009-05-30 00:30:10 +01:00
|
|
|
|
2015-10-27 22:38:21 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gpsbabel";
|
2021-01-06 07:52:00 +00:00
|
|
|
version = "1.7.0";
|
2009-05-30 00:30:10 +01:00
|
|
|
|
2017-07-23 11:47:30 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gpsbabel";
|
|
|
|
repo = "gpsbabel";
|
|
|
|
rev = "gpsbabel_${lib.replaceStrings ["."] ["_"] version}";
|
2021-01-06 07:52:00 +00:00
|
|
|
sha256 = "010g0vd2f5knpq5p7qfnl31kv3r8m5sjdsafcinbj5gh02j2nzpy";
|
2009-05-30 00:30:10 +01:00
|
|
|
};
|
|
|
|
|
2017-02-28 22:52:52 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://sources.debian.net/data/main/g/gpsbabel/1.5.3-2/debian/patches/use_minizip";
|
2017-02-28 22:52:52 +00:00
|
|
|
sha256 = "03fpsmlx1wc48d1j405zkzp8j64hcp0z72islf4mk1immql3ibcr";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-06 07:52:00 +00:00
|
|
|
buildInputs = [ libusb1 qtbase zlib ]
|
2017-03-06 22:29:48 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ IOKit ];
|
2009-05-30 00:30:10 +01:00
|
|
|
|
2021-01-04 12:55:48 +00:00
|
|
|
checkInputs = [ expat.dev which ]; # Avoid ./testo.d/kml.test: line 74: which: command not found. Skipping KML validation phase.
|
2021-01-06 07:52:00 +00:00
|
|
|
|
2009-05-30 00:30:10 +01:00
|
|
|
/* FIXME: Building the documentation, with "make doc", requires this:
|
|
|
|
|
|
|
|
[ libxml2 libxslt perl docbook_xml_dtd_412 docbook_xsl fop ]
|
|
|
|
|
|
|
|
But FOP isn't packaged yet. */
|
|
|
|
|
2015-11-14 22:59:20 +00:00
|
|
|
configureFlags = [ "--with-zlib=system" ]
|
|
|
|
# Floating point behavior on i686 causes test failures. Preventing
|
|
|
|
# extended precision fixes this problem.
|
2021-01-15 05:42:41 +00:00
|
|
|
++ lib.optionals stdenv.isi686 [
|
2015-11-28 10:25:35 +00:00
|
|
|
"CFLAGS=-ffloat-store" "CXXFLAGS=-ffloat-store"
|
|
|
|
];
|
2012-08-19 14:50:50 +01:00
|
|
|
|
2015-11-14 22:59:42 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2012-08-19 14:50:50 +01:00
|
|
|
doCheck = true;
|
2015-10-27 22:38:21 +00:00
|
|
|
preCheck = ''
|
|
|
|
patchShebangs testo
|
|
|
|
substituteInPlace testo \
|
|
|
|
--replace "-x /usr/bin/hexdump" ""
|
2021-01-04 12:55:48 +00:00
|
|
|
|
|
|
|
rm -v testo.d/alantrl.test
|
2017-03-06 22:29:48 +00:00
|
|
|
''
|
2015-11-28 10:25:35 +00:00
|
|
|
# The raymarine and gtm tests fail on i686 despite -ffloat-store.
|
2017-03-06 22:29:48 +00:00
|
|
|
+ lib.optionalString stdenv.isi686 "rm -v testo.d/raymarine.test testo.d/gtm.test;"
|
2017-04-11 19:18:53 +01:00
|
|
|
# The gtm, kml and tomtom asc tests fail on darwin, see PR #23572.
|
2017-07-24 13:34:59 +01:00
|
|
|
+ lib.optionalString stdenv.isDarwin "rm -v testo.d/gtm.test testo.d/kml.test testo.d/tomtom_asc.test testo.d/classic-2.test"
|
|
|
|
# The arc-project test fails on aarch64.
|
|
|
|
+ lib.optionalString stdenv.isAarch64 "rm -v testo.d/arc-project.test";
|
2009-05-30 00:30:10 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Convert, upload and download data from GPS and Map programs";
|
2009-05-30 00:30:10 +01:00
|
|
|
longDescription = ''
|
|
|
|
GPSBabel converts waypoints, tracks, and routes between popular
|
|
|
|
GPS receivers and mapping programs. It also has powerful
|
|
|
|
manipulation tools for such data.
|
|
|
|
|
|
|
|
By flattening the Tower of Babel that the authors of various
|
|
|
|
programs for manipulating GPS data have imposed upon us, it
|
|
|
|
returns to us the ability to freely move our own waypoint data
|
|
|
|
between the programs and hardware we choose to use.
|
|
|
|
|
|
|
|
It contains extensive data manipulation abilities making it a
|
|
|
|
convenient for server-side processing or as the backend for
|
|
|
|
other tools.
|
|
|
|
|
|
|
|
It does not convert, transfer, send, or manipulate maps. We
|
|
|
|
process data that may (or may not be) placed on a map, such as
|
|
|
|
waypoints, tracks, and routes.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.gpsbabel.org/";
|
2015-10-27 22:38:21 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.all;
|
2009-05-30 00:30:10 +01:00
|
|
|
};
|
|
|
|
}
|