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