forked from mirrors/nixpkgs
66 lines
1.8 KiB
Nix
66 lines
1.8 KiB
Nix
{ 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
|
|
, withDemoAgent ? false
|
|
}:
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "geoclue";
|
|
version = "2.5.3";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.freedesktop.org";
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "1wbpi74dw3p7izxwd57irz2i1g55r7wzl5h2yf0ns0hgq2njdfsg";
|
|
};
|
|
|
|
patches = [
|
|
./add-option-for-installation-sysconfdir.patch
|
|
];
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
nativeBuildInputs = [
|
|
pkgconfig intltool meson ninja wrapGAppsHook python3 vala 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 ];
|
|
|
|
mesonFlags = [
|
|
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
|
|
"-Ddemo-agent=${if withDemoAgent then "true" else "false"}"
|
|
"--sysconfdir=/etc"
|
|
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
|
"-Ddbus-srv-user=geoclue"
|
|
] ++ optionals stdenv.isDarwin [
|
|
"-D3g-source=false"
|
|
"-Dcdma-source=false"
|
|
"-Dmodem-gps-source=false"
|
|
"-Dnmea-source=false"
|
|
];
|
|
|
|
postPatch = ''
|
|
chmod +x demo/install-file.py
|
|
patchShebangs demo/install-file.py
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Geolocation framework and some data providers";
|
|
homepage = https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home;
|
|
maintainers = with maintainers; [ raskin ];
|
|
platforms = with platforms; linux ++ darwin;
|
|
license = licenses.lgpl2;
|
|
};
|
|
}
|