2018-09-01 03:47:02 +02:00
|
|
|
{ fetchurl, stdenv, fetchpatch, intltool, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk_pixbuf
|
2018-07-21 02:44:15 +02:00
|
|
|
, modemmanager, avahi, glib-networking, wrapGAppsHook, gobjectIntrospection
|
|
|
|
, withDemoAgent ? false
|
2013-10-29 16:23:24 +01:00
|
|
|
}:
|
|
|
|
|
2017-04-01 02:10:32 +02:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2013-10-29 16:23:24 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-07-21 02:44:15 +02:00
|
|
|
name = "geoclue-${version}";
|
2018-08-09 16:20:28 +02:00
|
|
|
version = "2.4.12";
|
2013-10-29 16:23:24 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-07-21 02:44:15 +02:00
|
|
|
url = "https://www.freedesktop.org/software/geoclue/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
|
2018-08-09 16:20:28 +02:00
|
|
|
sha256 = "1jnad1f3rf8h05sz1lc172jnqdhqdpz76ff6m7i5ss3s0znf5l05";
|
2013-10-29 16:23:24 +01:00
|
|
|
};
|
|
|
|
|
2018-07-21 02:44:15 +02:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2017-10-28 18:17:42 +02:00
|
|
|
|
2017-09-22 05:23:52 +02:00
|
|
|
nativeBuildInputs = [
|
2018-08-09 16:20:28 +02:00
|
|
|
pkgconfig intltool wrapGAppsHook gobjectIntrospection
|
|
|
|
# devdoc
|
2018-09-01 03:47:02 +02:00
|
|
|
gtk-doc docbook_xsl docbook_xml_dtd_412
|
2017-09-22 05:23:52 +02:00
|
|
|
];
|
|
|
|
|
2018-07-21 02:44:15 +02:00
|
|
|
buildInputs = [
|
|
|
|
glib json-glib libsoup avahi
|
|
|
|
] ++ optionals withDemoAgent [
|
|
|
|
libnotify gdk_pixbuf
|
|
|
|
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ glib glib-networking ];
|
|
|
|
|
2018-09-01 03:47:02 +02:00
|
|
|
# Whitelist elementary's agent
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/2b0491e408be1ebcdbe8751bb2637c1acb78f71e.patch";
|
|
|
|
sha256 = "0pac94y55iksk340dlx3gkhb9lrci90mxqqy5fnh1zbjw9bqxfn4";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-07-21 02:44:15 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
|
|
|
"--enable-introspection"
|
|
|
|
"--enable-gtk-doc"
|
|
|
|
"--enable-demo-agent=${if withDemoAgent then "yes" else "no"}"
|
|
|
|
] ++ optionals stdenv.isDarwin [
|
|
|
|
"--disable-silent-rules"
|
|
|
|
"--disable-3g-source"
|
|
|
|
"--disable-cdma-source"
|
|
|
|
"--disable-modem-gps-source"
|
|
|
|
"--disable-nmea-source"
|
|
|
|
];
|
2017-04-01 02:10:32 +02:00
|
|
|
|
2016-03-09 04:17:17 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-29 16:23:24 +01:00
|
|
|
description = "Geolocation framework and some data providers";
|
2018-07-21 02:44:15 +02:00
|
|
|
homepage = https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home;
|
2016-03-09 04:17:17 +01:00
|
|
|
maintainers = with maintainers; [ raskin garbas ];
|
2017-04-01 02:10:32 +02:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-03-09 04:17:17 +01:00
|
|
|
license = licenses.lgpl2;
|
2013-10-29 16:23:24 +01:00
|
|
|
};
|
|
|
|
}
|