Skip to content

Commit

Permalink
gpsbabel: fix darwin build
Browse files Browse the repository at this point in the history
  • Loading branch information
rycee committed Apr 10, 2017
1 parent 1bb8a47 commit 08656a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 7 additions & 6 deletions pkgs/applications/misc/gpsbabel/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, zlib, qt4, which }:
{ lib, stdenv, fetchurl, fetchpatch, zlib, qt4, which, IOKit }:

stdenv.mkDerivation rec {
name = "gpsbabel-${version}";
Expand All @@ -18,7 +18,8 @@ stdenv.mkDerivation rec {
})
];

buildInputs = [ zlib qt4 which ];
buildInputs = [ zlib qt4 which ]
++ lib.optionals stdenv.isDarwin [ IOKit ];

/* FIXME: Building the documentation, with "make doc", requires this:
Expand All @@ -40,11 +41,11 @@ stdenv.mkDerivation rec {
patchShebangs testo
substituteInPlace testo \
--replace "-x /usr/bin/hexdump" ""
'' + (
''
# 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 ""
);
+ lib.optionalString stdenv.isi686 "rm -v testo.d/raymarine.test testo.d/gtm.test;"
# The tomtom asc test fails on darwin, see PR #23572.
+ lib.optionalString stdenv.isDarwin "rm -v testo.d/tomtom_asc.test;";

meta = with stdenv.lib; {
description = "Convert, upload and download data from GPS and Map programs";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13985,7 +13985,9 @@ with pkgs;

gosmore = callPackage ../applications/misc/gosmore { };

gpsbabel = libsForQt5.callPackage ../applications/misc/gpsbabel { };
gpsbabel = libsForQt5.callPackage ../applications/misc/gpsbabel {
inherit (darwin) IOKit;
};

gpscorrelate = callPackage ../applications/misc/gpscorrelate { };

Expand Down

0 comments on commit 08656a7

Please sign in to comment.