2021-04-14 00:11:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
2021-04-14 00:30:43 +00:00
|
|
|
, fetchpatch
|
2021-04-14 00:11:08 +00:00
|
|
|
, intltool
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gtk-doc
|
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_412
|
|
|
|
, glib
|
|
|
|
, json-glib
|
|
|
|
, libsoup
|
|
|
|
, libnotify
|
|
|
|
, gdk-pixbuf
|
|
|
|
, modemmanager
|
|
|
|
, avahi
|
|
|
|
, glib-networking
|
|
|
|
, python3
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gobject-introspection
|
|
|
|
, vala
|
2018-07-21 00:44:15 +00:00
|
|
|
, withDemoAgent ? false
|
2013-10-29 15:23:24 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-02 02:53:43 +00:00
|
|
|
pname = "geoclue";
|
2021-04-14 00:15:13 +00:00
|
|
|
version = "2.5.7";
|
2018-11-30 22:14:39 +00:00
|
|
|
|
2021-04-14 00:11:08 +00:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
|
2018-11-30 22:14:39 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
2019-03-02 02:53:43 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2018-11-30 22:14:39 +00:00
|
|
|
rev = version;
|
2021-04-14 00:15:13 +00:00
|
|
|
sha256 = "1mv1vs4q94bqkmgkj53jcsw1x31kczwydyy3r27a7fycgzmii1pj";
|
2013-10-29 15:23:24 +00:00
|
|
|
};
|
|
|
|
|
2018-12-20 17:46:05 +00:00
|
|
|
patches = [
|
2021-04-14 00:30:43 +00:00
|
|
|
# Make the Mozilla API key configurable
|
|
|
|
# https://gitlab.freedesktop.org/geoclue/geoclue/merge_requests/54 (only partially backported)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/95c9ad4dc176860c85a07d0db4cb4179929bdb54.patch";
|
|
|
|
sha256 = "/lq/dLBJl2vf16tt7emYoTtXY6iUw+4s2XcABUHp3Kc=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/1a00809a0d89b0849a57647c878d192354247a33.patch";
|
|
|
|
sha256 = "6FuiukgFWg2cEKt8LlKP4E0rfSH/ZQgk6Ip1mGJpNFQ=";
|
|
|
|
})
|
|
|
|
|
2018-12-20 17:46:05 +00:00
|
|
|
./add-option-for-installation-sysconfdir.patch
|
|
|
|
];
|
|
|
|
|
2017-09-22 03:23:52 +00:00
|
|
|
nativeBuildInputs = [
|
2021-04-14 00:11:08 +00:00
|
|
|
pkg-config
|
|
|
|
intltool
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
wrapGAppsHook
|
|
|
|
python3
|
|
|
|
vala
|
|
|
|
gobject-introspection
|
2018-08-09 14:20:28 +00:00
|
|
|
# devdoc
|
2021-04-14 00:11:08 +00:00
|
|
|
gtk-doc
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_412
|
2017-09-22 03:23:52 +00:00
|
|
|
];
|
|
|
|
|
2018-07-21 00:44:15 +00:00
|
|
|
buildInputs = [
|
2021-04-14 00:11:08 +00:00
|
|
|
glib
|
|
|
|
json-glib
|
|
|
|
libsoup
|
|
|
|
avahi
|
|
|
|
] ++ lib.optionals withDemoAgent [
|
2019-05-22 11:03:39 +00:00
|
|
|
libnotify gdk-pixbuf
|
2021-04-14 00:11:08 +00:00
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
|
|
|
modemmanager
|
|
|
|
];
|
2018-07-21 00:44:15 +00:00
|
|
|
|
2021-04-14 00:11:08 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
glib-networking
|
|
|
|
];
|
2018-07-21 00:44:15 +00:00
|
|
|
|
2018-11-30 22:14:39 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
|
2021-04-14 00:11:08 +00:00
|
|
|
"-Ddemo-agent=${lib.boolToString withDemoAgent}"
|
2018-12-20 17:46:05 +00:00
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
2021-04-14 00:30:43 +00:00
|
|
|
"-Dmozilla-api-key=5c28d1f4-9511-47ff-b11a-2bef80fc177c"
|
2019-05-19 22:53:18 +00:00
|
|
|
"-Ddbus-srv-user=geoclue"
|
2019-09-16 02:16:51 +00:00
|
|
|
"-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
|
2021-04-14 00:11:08 +00:00
|
|
|
] ++ lib.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 00:44:15 +00:00
|
|
|
];
|
2017-04-01 00:10:32 +00:00
|
|
|
|
2018-11-30 22:14:39 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x demo/install-file.py
|
|
|
|
patchShebangs demo/install-file.py
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2013-10-29 15:23:24 +00:00
|
|
|
description = "Geolocation framework and some data providers";
|
2020-02-28 17:47:30 +00:00
|
|
|
homepage = "https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home";
|
2019-07-03 09:27:39 +00:00
|
|
|
maintainers = with maintainers; [ raskin ];
|
2017-04-01 00:10:32 +00: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
|
|
|
};
|
|
|
|
}
|