lol

Fix geoclue build on Darwin

authored by

Hamish Mackenzie and committed by
Profpatsch
bde6e3da e94437d1

+16 -6
+16 -6
pkgs/development/libraries/geoclue/2.0.nix
··· 1 - { fetchurl, stdenv, intltool, pkgconfig, glib, json_glib, libsoup, geoip 1 + { fetchurl, stdenv, intltool, libintlOrEmpty, pkgconfig, glib, json_glib, libsoup, geoip 2 2 , dbus, dbus_glib, modemmanager, avahi 3 3 }: 4 + 5 + with stdenv.lib; 4 6 5 7 stdenv.mkDerivation rec { 6 8 name = "geoclue-2.4.3"; ··· 10 12 sha256 = "0pk07k65dlw37nz8z5spksivsv5nh96xmbi336rf2yfxf2ldpadd"; 11 13 }; 12 14 13 - buildInputs = 15 + buildInputs = libintlOrEmpty ++ 14 16 [ intltool pkgconfig glib json_glib libsoup geoip 15 - dbus dbus_glib modemmanager avahi 16 - ]; 17 + dbus dbus_glib avahi 18 + ] ++ optionals (!stdenv.isDarwin) [ modemmanager ]; 17 19 18 20 preConfigure = '' 19 21 substituteInPlace configure --replace "-Werror" "" 20 22 ''; 21 23 22 - configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; 24 + configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ] ++ 25 + optionals stdenv.isDarwin [ 26 + "--disable-silent-rules" 27 + "--disable-3g-source" 28 + "--disable-cdma-source" 29 + "--disable-modem-gps-source" 30 + "--disable-nmea-source" ]; 31 + 32 + NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl"; 23 33 24 34 propagatedBuildInputs = [ dbus dbus_glib glib ]; 25 35 26 36 meta = with stdenv.lib; { 27 37 description = "Geolocation framework and some data providers"; 28 38 maintainers = with maintainers; [ raskin garbas ]; 29 - platforms = platforms.linux; 39 + platforms = with platforms; linux ++ darwin; 30 40 license = licenses.lgpl2; 31 41 }; 32 42 }