nixpkgs/pkgs/development/libraries/geoclue/default.nix

62 lines
1.9 KiB
Nix
Raw Normal View History

{ fetchurl, stdenv, fetchpatch, intltool, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk_pixbuf
2018-07-21 01:44:15 +01:00
, modemmanager, avahi, glib-networking, wrapGAppsHook, gobjectIntrospection
, withDemoAgent ? false
}:
2017-04-01 01:10:32 +01:00
with stdenv.lib;
stdenv.mkDerivation rec {
2018-07-21 01:44:15 +01:00
name = "geoclue-${version}";
2018-08-09 15:20:28 +01:00
version = "2.4.12";
src = fetchurl {
2018-07-21 01:44:15 +01:00
url = "https://www.freedesktop.org/software/geoclue/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
2018-08-09 15:20:28 +01:00
sha256 = "1jnad1f3rf8h05sz1lc172jnqdhqdpz76ff6m7i5ss3s0znf5l05";
};
2018-07-21 01:44:15 +01:00
outputs = [ "out" "dev" "devdoc" ];
2017-10-28 17:17:42 +01:00
nativeBuildInputs = [
2018-08-09 15:20:28 +01:00
pkgconfig intltool wrapGAppsHook gobjectIntrospection
# devdoc
gtk-doc docbook_xsl docbook_xml_dtd_412
];
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 ];
# Whitelist elementary's agent
patches = [
(fetchpatch {
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/2b0491e408be1ebcdbe8751bb2637c1acb78f71e.patch";
sha256 = "0pac94y55iksk340dlx3gkhb9lrci90mxqqy5fnh1zbjw9bqxfn4";
})
];
2018-07-21 01:44:15 +01: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 01:10:32 +01:00
2016-03-09 03:17:17 +00:00
meta = with stdenv.lib; {
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;
};
}