Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv
2, lib
3, fetchurl
4, pkg-config
5, meson
6, ninja
7, glib
8, gnome
9, gettext
10, gobject-introspection
11, vala
12, sqlite
13, dbus-glib
14, dbus
15, libgee
16, evolution-data-server-gtk4
17, python3
18, readline
19, gtk-doc
20, docbook-xsl-nons
21, docbook_xml_dtd_43
22, telepathy-glib
23, telepathySupport ? false
24}:
25
26# TODO: enable more folks backends
27
28stdenv.mkDerivation rec {
29 pname = "folks";
30 version = "0.15.6";
31
32 outputs = [ "out" "dev" "devdoc" ];
33
34 src = fetchurl {
35 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
36 sha256 = "yGZjDFU/Kc6b4cemAmfLQICmvM9LjVUdxMfmI02EAkg=";
37 };
38
39 nativeBuildInputs = [
40 gettext
41 gobject-introspection
42 gtk-doc
43 docbook-xsl-nons
44 docbook_xml_dtd_43
45 meson
46 ninja
47 pkg-config
48 vala
49 ] ++ lib.optionals telepathySupport [
50 python3
51 ];
52
53 buildInputs = [
54 dbus-glib
55 evolution-data-server-gtk4 # UI part not needed, using gtk4 version to reduce system closure.
56 readline
57 ] ++ lib.optionals telepathySupport [
58 telepathy-glib
59 ];
60
61 propagatedBuildInputs = [
62 glib
63 libgee
64 sqlite
65 ];
66
67 nativeCheckInputs = [
68 dbus
69 (python3.withPackages (pp: with pp; [
70 python-dbusmock
71 # The following possibly need to be propagated by dbusmock
72 # if they are not optional
73 dbus-python
74 pygobject3
75 ]))
76 ];
77
78 mesonFlags = [
79 "-Ddocs=true"
80 "-Dtelepathy_backend=${lib.boolToString telepathySupport}"
81 # For some reason, the tests are getting stuck on 31/32,
82 # even though the one missing test finishes just fine on next run,
83 # when tests are permuted differently. And another test that
84 # previously passed will be stuck instead.
85 "-Dtests=false"
86 ];
87
88 doCheck = false;
89
90 # Prevents e-d-s add-contacts-stress-test from timing out
91 checkPhase = ''
92 runHook preCheck
93 meson test --timeout-multiplier 4
94 runHook postCheck
95 '';
96
97 postPatch = lib.optionalString telepathySupport ''
98 patchShebangs tests/tools/manager-file.py
99 '';
100
101 passthru = {
102 updateScript = gnome.updateScript {
103 packageName = pname;
104 versionPolicy = "none";
105 };
106 };
107
108 meta = with lib; {
109 description = "A library that aggregates people from multiple sources to create metacontacts";
110 homepage = "https://wiki.gnome.org/Projects/Folks";
111 license = licenses.lgpl21Plus;
112 maintainers = teams.gnome.members;
113 platforms = platforms.unix;
114 };
115}