e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
116 lines
2.5 KiB
Nix
116 lines
2.5 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchurl
|
|
, pkg-config
|
|
, meson
|
|
, ninja
|
|
, glib
|
|
, gnome
|
|
, gettext
|
|
, gobject-introspection
|
|
, vala
|
|
, sqlite
|
|
, dbus-glib
|
|
, dbus
|
|
, libgee
|
|
, evolution-data-server-gtk4
|
|
, python3
|
|
, readline
|
|
, gtk-doc
|
|
, docbook-xsl-nons
|
|
, docbook_xml_dtd_43
|
|
, telepathy-glib
|
|
, telepathySupport ? false
|
|
}:
|
|
|
|
# TODO: enable more folks backends
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "folks";
|
|
version = "0.15.7";
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
sha256 = "Eg8hnvYyEsqpWuf2rrZOKZKLCxqLlFIFQwSgDQ80eHE=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
gettext
|
|
gobject-introspection
|
|
gtk-doc
|
|
docbook-xsl-nons
|
|
docbook_xml_dtd_43
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
vala
|
|
] ++ lib.optionals telepathySupport [
|
|
python3
|
|
];
|
|
|
|
buildInputs = [
|
|
dbus-glib
|
|
evolution-data-server-gtk4 # UI part not needed, using gtk4 version to reduce system closure.
|
|
readline
|
|
] ++ lib.optionals telepathySupport [
|
|
telepathy-glib
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
glib
|
|
libgee
|
|
sqlite
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
dbus
|
|
(python3.withPackages (pp: with pp; [
|
|
python-dbusmock
|
|
# The following possibly need to be propagated by dbusmock
|
|
# if they are not optional
|
|
dbus-python
|
|
pygobject3
|
|
]))
|
|
];
|
|
|
|
mesonFlags = [
|
|
"-Ddocs=true"
|
|
"-Dtelepathy_backend=${lib.boolToString telepathySupport}"
|
|
"-Dtests=${lib.boolToString stdenv.isLinux}"
|
|
];
|
|
|
|
# backends/eds/lib/libfolks-eds.so.26.0.0.p/edsf-persona-store.c:10697:4:
|
|
# error: call to undeclared function 'folks_persona_store_set_is_user_set_default';
|
|
# ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration";
|
|
|
|
doCheck = stdenv.isLinux;
|
|
|
|
# Prevents e-d-s add-contacts-stress-test from timing out
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
meson test --timeout-multiplier 4
|
|
runHook postCheck
|
|
'';
|
|
|
|
postPatch = lib.optionalString telepathySupport ''
|
|
patchShebangs tests/tools/manager-file.py
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = gnome.updateScript {
|
|
packageName = pname;
|
|
versionPolicy = "none";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "A library that aggregates people from multiple sources to create metacontacts";
|
|
homepage = "https://wiki.gnome.org/Projects/Folks";
|
|
license = licenses.lgpl21Plus;
|
|
maintainers = teams.gnome.members;
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|