1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ fetchurl, stdenv, fetchpatch, intltool, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk_pixbuf
, modemmanager, avahi, glib-networking, wrapGAppsHook, gobject-introspection
, withDemoAgent ? false
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "geoclue-${version}";
version = "2.4.12";
src = fetchurl {
url = "https://www.freedesktop.org/software/geoclue/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "1jnad1f3rf8h05sz1lc172jnqdhqdpz76ff6m7i5ss3s0znf5l05";
};
outputs = [ "out" "dev" "devdoc" ];
nativeBuildInputs = [
pkgconfig intltool wrapGAppsHook gobject-introspection
# devdoc
gtk-doc docbook_xsl docbook_xml_dtd_412
];
buildInputs = [
glib json-glib libsoup avahi
] ++ optionals withDemoAgent [
libnotify gdk_pixbuf
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
propagatedBuildInputs = [ glib glib-networking ];
# Whitelist elementary's agent
patches = [
(fetchpatch {
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/2b0491e408be1ebcdbe8751bb2637c1acb78f71e.patch";
sha256 = "0pac94y55iksk340dlx3gkhb9lrci90mxqqy5fnh1zbjw9bqxfn4";
})
];
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"
];
meta = with stdenv.lib; {
description = "Geolocation framework and some data providers";
homepage = https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home;
maintainers = with maintainers; [ raskin garbas ];
platforms = with platforms; linux ++ darwin;
license = licenses.lgpl2;
};
}
|