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

57 lines
1.8 KiB
Nix
Raw Normal View History

2018-07-21 02:44:15 +02:00
{ fetchurl, stdenv, intltool, pkgconfig, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk_pixbuf
, modemmanager, avahi, glib-networking, wrapGAppsHook, gobjectIntrospection
, withDemoAgent ? false
}:
2017-04-01 02:10:32 +02:00
with stdenv.lib;
stdenv.mkDerivation rec {
2018-07-21 02:44:15 +02:00
name = "geoclue-${version}";
version = "2.4.10";
src = fetchurl {
2018-07-21 02:44:15 +02:00
url = "https://www.freedesktop.org/software/geoclue/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "0h4n8jf7w457sglfdhghkyf8n4v4a5jrx8dgdy5zn35nbscx24l4";
};
2018-07-21 02:44:15 +02:00
outputs = [ "out" "dev" "devdoc" ];
2017-10-28 18:17:42 +02:00
nativeBuildInputs = [
2018-07-21 02:44:15 +02:00
pkgconfig intltool gtk-doc docbook_xsl docbook_xml_dtd_412 wrapGAppsHook gobjectIntrospection
];
2018-07-21 02:44:15 +02:00
buildInputs = [
glib json-glib libsoup avahi
] ++ optionals withDemoAgent [
libnotify gdk_pixbuf
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
propagatedBuildInputs = [ glib glib-networking ];
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 02:10:32 +02:00
2018-07-21 02:44:15 +02:00
# https://gitlab.freedesktop.org/geoclue/geoclue/issues/73
2017-10-28 18:17:42 +02:00
postInstall = ''
sed -i $dev/lib/pkgconfig/libgeoclue-2.0.pc -e "s|includedir=.*|includedir=$dev/include|"
'';
2016-03-09 04:17:17 +01:00
meta = with stdenv.lib; {
description = "Geolocation framework and some data providers";
2018-07-21 02:44:15 +02:00
homepage = https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home;
2016-03-09 04:17:17 +01:00
maintainers = with maintainers; [ raskin garbas ];
2017-04-01 02:10:32 +02:00
platforms = with platforms; linux ++ darwin;
2016-03-09 04:17:17 +01:00
license = licenses.lgpl2;
};
}