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

67 lines
1.9 KiB
Nix
Raw Normal View History

2019-05-22 04:03:39 -07:00
{ stdenv, fetchFromGitLab, intltool, meson, ninja, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk-pixbuf
, modemmanager, avahi, glib-networking, python3, wrapGAppsHook, gobject-introspection, vala
2018-07-20 17:44:15 -07:00
, withDemoAgent ? false
}:
2017-03-31 17:10:32 -07:00
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "geoclue";
version = "2.5.5";
2018-11-30 14:14:39 -08:00
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = pname;
repo = pname;
2018-11-30 14:14:39 -08:00
rev = version;
sha256 = "0a8wmf5v3x4035ixz9jypj7c6qknvs6gjv2zawa3msq1j75rf2r5";
};
2018-12-20 09:46:05 -08:00
patches = [
./add-option-for-installation-sysconfdir.patch
];
2018-07-20 17:44:15 -07:00
outputs = [ "out" "dev" "devdoc" ];
2017-10-28 09:17:42 -07:00
nativeBuildInputs = [
pkgconfig intltool meson ninja wrapGAppsHook python3 vala gobject-introspection
2018-08-09 07:20:28 -07:00
# devdoc
gtk-doc docbook_xsl docbook_xml_dtd_412
];
2018-07-20 17:44:15 -07:00
buildInputs = [
glib json-glib libsoup avahi
] ++ optionals withDemoAgent [
2019-05-22 04:03:39 -07:00
libnotify gdk-pixbuf
2018-07-20 17:44:15 -07:00
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
propagatedBuildInputs = [ glib glib-networking ];
2018-11-30 14:14:39 -08:00
mesonFlags = [
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
"-Ddemo-agent=${if withDemoAgent then "true" else "false"}"
2018-12-20 09:46:05 -08:00
"--sysconfdir=/etc"
"-Dsysconfdir_install=${placeholder "out"}/etc"
2019-05-19 15:53:18 -07:00
"-Ddbus-srv-user=geoclue"
"-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
2018-07-20 17:44:15 -07:00
] ++ optionals stdenv.isDarwin [
2018-11-30 14:14:39 -08:00
"-D3g-source=false"
"-Dcdma-source=false"
"-Dmodem-gps-source=false"
"-Dnmea-source=false"
2018-07-20 17:44:15 -07:00
];
2017-03-31 17:10:32 -07:00
2018-11-30 14:14:39 -08:00
postPatch = ''
chmod +x demo/install-file.py
patchShebangs demo/install-file.py
'';
2016-03-08 19:17:17 -08:00
meta = with stdenv.lib; {
description = "Geolocation framework and some data providers";
2018-07-20 17:44:15 -07:00
homepage = https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home;
maintainers = with maintainers; [ raskin ];
2017-03-31 17:10:32 -07:00
platforms = with platforms; linux ++ darwin;
2016-03-08 19:17:17 -08:00
license = licenses.lgpl2;
};
}