2019-05-22 14:03:39 +03:00
|
|
|
{ stdenv, fetchFromGitLab, intltool, meson, ninja, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk-pixbuf
|
2018-12-03 14:37:22 +03:00
|
|
|
, modemmanager, avahi, glib-networking, python3, wrapGAppsHook, gobject-introspection, vala
|
2018-07-21 03:44:15 +03:00
|
|
|
, withDemoAgent ? false
|
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 {
|
2019-03-02 05:53:43 +03:00
|
|
|
pname = "geoclue";
|
2019-10-07 12:02:43 +03:00
|
|
|
version = "2.5.5";
|
2018-12-01 01:14:39 +03:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
2019-03-02 05:53:43 +03:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2018-12-01 01:14:39 +03:00
|
|
|
rev = version;
|
2019-10-07 12:02:43 +03:00
|
|
|
sha256 = "0a8wmf5v3x4035ixz9jypj7c6qknvs6gjv2zawa3msq1j75rf2r5";
|
2013-10-29 19:23:24 +04:00
|
|
|
};
|
|
|
|
|
2018-12-20 20:46:05 +03:00
|
|
|
patches = [
|
|
|
|
./add-option-for-installation-sysconfdir.patch
|
|
|
|
];
|
|
|
|
|
2018-07-21 03:44:15 +03:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2017-10-28 19:17:42 +03:00
|
|
|
|
2017-09-22 06:23:52 +03:00
|
|
|
nativeBuildInputs = [
|
2018-12-03 14:37:22 +03:00
|
|
|
pkgconfig intltool meson ninja wrapGAppsHook python3 vala gobject-introspection
|
2018-08-09 17:20:28 +03:00
|
|
|
# devdoc
|
2018-09-01 04:47:02 +03:00
|
|
|
gtk-doc docbook_xsl docbook_xml_dtd_412
|
2017-09-22 06:23:52 +03:00
|
|
|
];
|
|
|
|
|
2018-07-21 03:44:15 +03:00
|
|
|
buildInputs = [
|
|
|
|
glib json-glib libsoup avahi
|
|
|
|
] ++ optionals withDemoAgent [
|
2019-05-22 14:03:39 +03:00
|
|
|
libnotify gdk-pixbuf
|
2018-07-21 03:44:15 +03:00
|
|
|
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ glib glib-networking ];
|
|
|
|
|
2018-12-01 01:14:39 +03:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
|
|
|
|
"-Ddemo-agent=${if withDemoAgent then "true" else "false"}"
|
2018-12-20 20:46:05 +03:00
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
2019-05-20 01:53:18 +03:00
|
|
|
"-Ddbus-srv-user=geoclue"
|
2019-09-16 05:16:51 +03:00
|
|
|
"-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
|
2018-07-21 03:44:15 +03:00
|
|
|
] ++ optionals stdenv.isDarwin [
|
2018-12-01 01:14:39 +03:00
|
|
|
"-D3g-source=false"
|
|
|
|
"-Dcdma-source=false"
|
|
|
|
"-Dmodem-gps-source=false"
|
|
|
|
"-Dnmea-source=false"
|
2018-07-21 03:44:15 +03:00
|
|
|
];
|
2017-04-01 03:10:32 +03:00
|
|
|
|
2018-12-01 01:14:39 +03:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x demo/install-file.py
|
|
|
|
patchShebangs demo/install-file.py
|
|
|
|
'';
|
|
|
|
|
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";
|
2018-07-21 03:44:15 +03:00
|
|
|
homepage = https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home;
|
2019-07-03 12:27:39 +03:00
|
|
|
maintainers = with maintainers; [ raskin ];
|
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
|
|
|
};
|
|
|
|
}
|