2017-04-01 03:10:32 +03:00
|
|
|
{ fetchurl, stdenv, intltool, libintlOrEmpty, pkgconfig, glib, json_glib, libsoup, geoip
|
2017-10-11 14:51:31 +03:00
|
|
|
, dbus, dbus_glib, modemmanager, avahi, glib_networking, wrapGAppsHook
|
2013-10-29 19:23:24 +04:00
|
|
|
}:
|
|
|
|
|
2017-04-01 03:10:32 +03:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2013-10-29 19:23:24 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2017-10-11 14:51:12 +03:00
|
|
|
name = "geoclue-2.4.7";
|
2013-10-29 19:23:24 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-12-12 16:26:46 +03:00
|
|
|
url = "http://www.freedesktop.org/software/geoclue/releases/2.4/${name}.tar.xz";
|
2017-10-11 14:51:12 +03:00
|
|
|
sha256 = "19hfmr8fa1js8ynazdyjxlyrqpjn6m1719ay70ilga4rayxrcyyi";
|
2013-10-29 19:23:24 +04:00
|
|
|
};
|
|
|
|
|
2017-10-28 19:17:42 +03:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2017-09-22 06:23:52 +03:00
|
|
|
nativeBuildInputs = [
|
2017-10-11 14:51:31 +03:00
|
|
|
pkgconfig intltool wrapGAppsHook
|
2017-09-22 06:23:52 +03:00
|
|
|
];
|
|
|
|
|
2017-04-01 03:10:32 +03:00
|
|
|
buildInputs = libintlOrEmpty ++
|
2017-10-11 14:51:31 +03:00
|
|
|
[ glib json_glib libsoup geoip
|
2017-04-01 03:10:32 +03:00
|
|
|
dbus dbus_glib avahi
|
|
|
|
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
|
2013-10-29 19:23:24 +04:00
|
|
|
|
2017-10-28 19:17:42 +03:00
|
|
|
propagatedBuildInputs = [ dbus dbus_glib glib glib_networking ];
|
|
|
|
|
2013-10-29 19:23:24 +04:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace configure --replace "-Werror" ""
|
|
|
|
'';
|
|
|
|
|
2017-04-01 03:10:32 +03:00
|
|
|
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";
|
2015-04-10 18:02:57 +03:00
|
|
|
|
2017-10-28 19:17:42 +03:00
|
|
|
postInstall = ''
|
|
|
|
sed -i $dev/lib/pkgconfig/libgeoclue-2.0.pc -e "s|includedir=.*|includedir=$dev/include|"
|
|
|
|
'';
|
2013-10-29 19:23:24 +04:00
|
|
|
|
2016-03-09 06:17:17 +03:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-29 19:23:24 +04:00
|
|
|
description = "Geolocation framework and some data providers";
|
2016-03-09 06:17:17 +03:00
|
|
|
maintainers = with maintainers; [ raskin garbas ];
|
2017-04-01 03:10:32 +03:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-03-09 06:17:17 +03:00
|
|
|
license = licenses.lgpl2;
|
2013-10-29 19:23:24 +04:00
|
|
|
};
|
|
|
|
}
|