summary refs log tree commit diff
path: root/pkgs/development/libraries/geoclue
diff options
context:
space:
mode:
authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>2017-04-01 13:10:32 +1300
committerProfpatsch <mail@profpatsch.de>2017-04-07 00:45:54 +0200
commitbde6e3da6f19f75a2b1f44094fabc7139be63c6d (patch)
tree876db0e3188af758ac0973ad44485e098dedab56 /pkgs/development/libraries/geoclue
parente94437d1ed7616f0e3dfa90498d81e191652cba8 (diff)
downloadnixpkgs-bde6e3da6f19f75a2b1f44094fabc7139be63c6d.tar
nixpkgs-bde6e3da6f19f75a2b1f44094fabc7139be63c6d.tar.gz
nixpkgs-bde6e3da6f19f75a2b1f44094fabc7139be63c6d.tar.bz2
nixpkgs-bde6e3da6f19f75a2b1f44094fabc7139be63c6d.tar.lz
nixpkgs-bde6e3da6f19f75a2b1f44094fabc7139be63c6d.tar.xz
nixpkgs-bde6e3da6f19f75a2b1f44094fabc7139be63c6d.tar.zst
nixpkgs-bde6e3da6f19f75a2b1f44094fabc7139be63c6d.zip
Fix geoclue build on Darwin
Diffstat (limited to 'pkgs/development/libraries/geoclue')
-rw-r--r--pkgs/development/libraries/geoclue/2.0.nix22
1 files changed, 16 insertions, 6 deletions
diff --git a/pkgs/development/libraries/geoclue/2.0.nix b/pkgs/development/libraries/geoclue/2.0.nix
index 0c22cc9ff9f..8cc06f9269e 100644
--- a/pkgs/development/libraries/geoclue/2.0.nix
+++ b/pkgs/development/libraries/geoclue/2.0.nix
@@ -1,7 +1,9 @@
-{ fetchurl, stdenv, intltool, pkgconfig, glib, json_glib, libsoup, geoip
+{ fetchurl, stdenv, intltool, libintlOrEmpty, pkgconfig, glib, json_glib, libsoup, geoip
 , dbus, dbus_glib, modemmanager, avahi
 }:
 
+with stdenv.lib;
+
 stdenv.mkDerivation rec {
   name = "geoclue-2.4.3";
 
@@ -10,23 +12,31 @@ stdenv.mkDerivation rec {
     sha256 = "0pk07k65dlw37nz8z5spksivsv5nh96xmbi336rf2yfxf2ldpadd";
   };
 
-  buildInputs =
+  buildInputs = libintlOrEmpty ++
    [ intltool pkgconfig glib json_glib libsoup geoip
-     dbus dbus_glib modemmanager avahi
-   ];
+     dbus dbus_glib avahi
+   ] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
 
   preConfigure = ''
      substituteInPlace configure --replace "-Werror" ""
   '';
 
-  configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ];
+  configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ] ++
+                   optionals stdenv.isDarwin [
+                       "--disable-silent-rules"
+                       "--disable-3g-source"
+                       "--disable-cdma-source"
+                       "--disable-modem-gps-source"
+                       "--disable-nmea-source" ];
+
+  NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl";
 
   propagatedBuildInputs = [ dbus dbus_glib glib ];
 
   meta = with stdenv.lib; {
     description = "Geolocation framework and some data providers";
     maintainers = with maintainers; [ raskin garbas ];
-    platforms = platforms.linux;
+    platforms = with platforms; linux ++ darwin;
     license = licenses.lgpl2;
   };
 }