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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

109 lines
2.2 KiB
Nix
Raw Normal View History

2021-04-14 00:11:08 +00:00
{ lib
, stdenv
, fetchFromGitLab
, fetchpatch
2021-04-14 00:11:08 +00:00
, intltool
, meson
, mesonEmulatorHook
2021-04-14 00:11:08 +00:00
, ninja
, pkg-config
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_412
, glib
, json-glib
, libsoup
, libnotify
, gdk-pixbuf
, modemmanager
, avahi
, glib-networking
, python3
, wrapGAppsHook
, gobject-introspection
, vala
2018-07-21 00:44:15 +00:00
, withDemoAgent ? false
}:
stdenv.mkDerivation rec {
pname = "geoclue";
2022-08-30 08:02:02 +00:00
version = "2.6.0";
2018-11-30 22:14:39 +00:00
2021-04-14 00:11:08 +00:00
outputs = [ "out" "dev" "devdoc" ];
2018-11-30 22:14:39 +00:00
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
2022-08-30 08:02:02 +00:00
owner = "geoclue";
repo = "geoclue";
2018-11-30 22:14:39 +00:00
rev = version;
2022-08-30 08:02:02 +00:00
hash = "sha256-TbuO9wpyjtvyvqaCryaTOunR0hVVlJuqENWQQpcMcz4=";
};
2018-12-20 17:46:05 +00:00
patches = [
./add-option-for-installation-sysconfdir.patch
];
nativeBuildInputs = [
2021-04-14 00:11:08 +00:00
pkg-config
intltool
meson
ninja
wrapGAppsHook
python3
vala
gobject-introspection
2018-08-09 14:20:28 +00:00
# devdoc
2021-04-14 00:11:08 +00:00
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_412
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
2018-07-21 00:44:15 +00:00
buildInputs = [
2021-04-14 00:11:08 +00:00
glib
json-glib
libsoup
avahi
gobject-introspection
2021-04-14 00:11:08 +00:00
] ++ lib.optionals withDemoAgent [
2019-05-22 11:03:39 +00:00
libnotify gdk-pixbuf
2021-04-14 00:11:08 +00:00
] ++ lib.optionals (!stdenv.isDarwin) [
modemmanager
];
2018-07-21 00:44:15 +00:00
2021-04-14 00:11:08 +00:00
propagatedBuildInputs = [
glib
glib-networking
];
2018-07-21 00:44:15 +00:00
2018-11-30 22:14:39 +00:00
mesonFlags = [
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
2021-04-14 00:11:08 +00:00
"-Ddemo-agent=${lib.boolToString withDemoAgent}"
2018-12-20 17:46:05 +00:00
"--sysconfdir=/etc"
"-Dsysconfdir_install=${placeholder "out"}/etc"
"-Dmozilla-api-key=5c28d1f4-9511-47ff-b11a-2bef80fc177c"
2019-05-19 22:53:18 +00:00
"-Ddbus-srv-user=geoclue"
"-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
2021-04-14 00:11:08 +00:00
] ++ lib.optionals stdenv.isDarwin [
2018-11-30 22:14:39 +00:00
"-D3g-source=false"
"-Dcdma-source=false"
"-Dmodem-gps-source=false"
"-Dnmea-source=false"
2018-07-21 00:44:15 +00:00
];
2017-04-01 00:10:32 +00:00
2018-11-30 22:14:39 +00:00
postPatch = ''
chmod +x demo/install-file.py
patchShebangs demo/install-file.py
'';
meta = with lib; {
2022-07-29 14:20:28 +00:00
broken = stdenv.isDarwin && withDemoAgent;
description = "Geolocation framework and some data providers";
2020-02-28 17:47:30 +00:00
homepage = "https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home";
maintainers = with maintainers; [ raskin ];
2017-04-01 00:10:32 +00:00
platforms = with platforms; linux ++ darwin;
2022-08-30 08:02:02 +00:00
license = licenses.lgpl2Plus;
};
}