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

75 lines
2.4 KiB
Nix
Raw Normal View History

2017-02-28 22:52:52 +00:00
{ stdenv, fetchurl, fetchpatch, zlib, qt4, which }:
stdenv.mkDerivation rec {
2012-08-19 13:50:50 +00:00
name = "gpsbabel-${version}";
2017-02-28 22:52:52 +00:00
version = "1.5.3";
src = fetchurl {
2012-08-19 13:50:50 +00:00
# gpgbabel.org makes it hard to get the source tarball automatically, so
# get it from elsewhere.
url = "mirror://debian/pool/main/g/gpsbabel/gpsbabel_${version}.orig.tar.gz";
2017-02-28 22:52:52 +00:00
sha256 = "0l6c8911f7i5bbdzah9irhqf127ib0b7lv53rb8r9z8g439mznq1";
};
2017-02-28 22:52:52 +00:00
patches = [
(fetchpatch {
url = https://sources.debian.net/data/main/g/gpsbabel/1.5.3-2/debian/patches/use_minizip;
sha256 = "03fpsmlx1wc48d1j405zkzp8j64hcp0z72islf4mk1immql3ibcr";
})
];
buildInputs = [ zlib qt4 which ];
/* 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.
2015-11-28 10:25:35 +00:00
++ stdenv.lib.optionals stdenv.isi686 [
"CFLAGS=-ffloat-store" "CXXFLAGS=-ffloat-store"
];
2012-08-19 13:50:50 +00:00
2015-11-14 22:59:42 +00:00
enableParallelBuilding = true;
2012-08-19 13:50:50 +00:00
doCheck = true;
preCheck = ''
patchShebangs testo
substituteInPlace testo \
--replace "-x /usr/bin/hexdump" ""
2015-11-28 10:25:35 +00:00
'' + (
# The raymarine and gtm tests fail on i686 despite -ffloat-store.
if stdenv.isi686 then "rm -v testo.d/raymarine.test testo.d/gtm.test;"
else ""
);
meta = with stdenv.lib; {
description = "Convert, upload and download data from GPS and Map programs";
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.
'';
homepage = http://www.gpsbabel.org/;
license = licenses.gpl2Plus;
maintainers = [ maintainers.rycee ];
platforms = platforms.all;
};
}