@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, fetchpatch, zlib, qt4, which }:
1+{ lib, stdenv, fetchurl, fetchpatch, zlib, qt4, which, IOKit }:
22
33stdenv.mkDerivation rec {
44 name = "gpsbabel-${version}";
@@ -12,13 +12,15 @@ stdenv.mkDerivation rec {
1212 };
1313
1414 patches = [
15+ ./clang-4.patch
1516 (fetchpatch {
1617 url = https://sources.debian.net/data/main/g/gpsbabel/1.5.3-2/debian/patches/use_minizip;
1718 sha256 = "03fpsmlx1wc48d1j405zkzp8j64hcp0z72islf4mk1immql3ibcr";
1819 })
1920 ];
2021
21− buildInputs = [ zlib qt4 which ];
22+ buildInputs = [ zlib qt4 which ]
23+ ++ lib.optionals stdenv.isDarwin [ IOKit ];
2224
2325 /* FIXME: Building the documentation, with "make doc", requires this:
2426
@@ -40,11 +42,11 @@ stdenv.mkDerivation rec {
4042 patchShebangs testo
4143 substituteInPlace testo \
4244 --replace "-x /usr/bin/hexdump" ""
43− '' + (
45+ ''
4446 # The raymarine and gtm tests fail on i686 despite -ffloat-store.
45− if stdenv.isi686 then "rm -v testo.d/raymarine.test testo.d/gtm.test;"
46− else ""
47− );
47+ + lib.optionalString stdenv.isi686 "rm -v testo.d/raymarine.test testo.d/gtm.test;"
48+ # The gtm, kml and tomtom asc tests fail on darwin, see PR #23572.
49+ + lib.optionalString stdenv.isDarwin "rm -v testo.d/gtm.test testo.d/kml.test testo.d/tomtom_asc.test";
4850
4951 meta = with stdenv.lib; {
5052 description = "Convert, upload and download data from GPS and Map programs";