2018-12-03 11:18:43 +00:00
|
|
|
{ stdenv, fetchFromGitLab, intltool, meson, ninja, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk_pixbuf
|
2018-11-30 22:14:39 +00:00
|
|
|
, modemmanager, avahi, glib-networking, python3, wrapGAppsHook, gobjectIntrospection, vala
|
2018-07-21 01:44:15 +01:00
|
|
|
, withDemoAgent ? false
|
2013-10-29 15:23:24 +00:00
|
|
|
}:
|
|
|
|
|
2017-04-01 01:10:32 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2013-10-29 15:23:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-07-21 01:44:15 +01:00
|
|
|
name = "geoclue-${version}";
|
2018-11-30 22:14:39 +00:00
|
|
|
version = "2.5.1";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "geoclue";
|
|
|
|
repo = "geoclue";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0vww6irijw5ss7vawkdi5z5wdpcgw4iqljn5vs3vbd4y3d0lzrbs";
|
2013-10-29 15:23:24 +00:00
|
|
|
};
|
|
|
|
|
2018-07-21 01:44:15 +01:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2017-10-28 17:17:42 +01:00
|
|
|
|
2017-09-22 04:23:52 +01:00
|
|
|
nativeBuildInputs = [
|
2018-12-03 11:18:43 +00:00
|
|
|
pkgconfig intltool meson ninja wrapGAppsHook python3 vala gobjectIntrospection
|
2018-08-09 15:20:28 +01:00
|
|
|
# devdoc
|
2018-09-01 02:47:02 +01:00
|
|
|
gtk-doc docbook_xsl docbook_xml_dtd_412
|
2017-09-22 04:23:52 +01:00
|
|
|
];
|
|
|
|
|
2018-07-21 01:44:15 +01:00
|
|
|
buildInputs = [
|
|
|
|
glib json-glib libsoup avahi
|
|
|
|
] ++ optionals withDemoAgent [
|
|
|
|
libnotify gdk_pixbuf
|
|
|
|
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ glib glib-networking ];
|
|
|
|
|
2018-11-30 22:14:39 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
|
|
|
|
"-Ddemo-agent=${if withDemoAgent then "true" else "false"}"
|
2018-07-21 01:44:15 +01:00
|
|
|
] ++ optionals stdenv.isDarwin [
|
2018-11-30 22:14:39 +00:00
|
|
|
"-D3g-source=false"
|
|
|
|
"-Dcdma-source=false"
|
|
|
|
"-Dmodem-gps-source=false"
|
|
|
|
"-Dnmea-source=false"
|
2018-07-21 01:44:15 +01:00
|
|
|
];
|
2017-04-01 01:10:32 +01:00
|
|
|
|
2018-11-30 22:14:39 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x demo/install-file.py
|
|
|
|
patchShebangs demo/install-file.py
|
|
|
|
'';
|
|
|
|
|
2016-03-09 03:17:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-29 15:23:24 +00:00
|
|
|
description = "Geolocation framework and some data providers";
|
2018-07-21 01:44:15 +01:00
|
|
|
homepage = https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home;
|
2016-03-09 03:17:17 +00:00
|
|
|
maintainers = with maintainers; [ raskin garbas ];
|
2017-04-01 01:10:32 +01:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-03-09 03:17:17 +00:00
|
|
|
license = licenses.lgpl2;
|
2013-10-29 15:23:24 +00:00
|
|
|
};
|
|
|
|
}
|