| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
| 3 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> |
| 4 | ;;; Copyright © 2019, 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl> |
| 5 | ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
| 6 | ;;; |
| 7 | ;;; This file is part of GNU Guix. |
| 8 | ;;; |
| 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 10 | ;;; under the terms of the GNU General Public License as published by |
| 11 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 12 | ;;; your option) any later version. |
| 13 | ;;; |
| 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | ;;; GNU General Public License for more details. |
| 18 | ;;; |
| 19 | ;;; You should have received a copy of the GNU General Public License |
| 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | (define-module (gnu packages jami) |
| 23 | #:use-module ((guix licenses) #:prefix license:) |
| 24 | #:use-module (gnu packages aidc) |
| 25 | #:use-module (gnu packages audio) |
| 26 | #:use-module (gnu packages autotools) |
| 27 | #:use-module (gnu packages backup) |
| 28 | #:use-module (gnu packages base) |
| 29 | #:use-module (gnu packages crypto) |
| 30 | #:use-module (gnu packages documentation) |
| 31 | #:use-module (gnu packages freedesktop) |
| 32 | #:use-module (gnu packages gcc) |
| 33 | #:use-module (gnu packages gettext) |
| 34 | #:use-module (gnu packages glib) |
| 35 | #:use-module (gnu packages gnome) |
| 36 | #:use-module (gnu packages graphviz) |
| 37 | #:use-module (gnu packages gtk) |
| 38 | #:use-module (gnu packages libcanberra) |
| 39 | #:use-module (gnu packages linux) |
| 40 | #:use-module (gnu packages networking) |
| 41 | #:use-module (gnu packages perl) |
| 42 | #:use-module (gnu packages pkg-config) |
| 43 | #:use-module (gnu packages pulseaudio) |
| 44 | #:use-module (gnu packages python) |
| 45 | #:use-module (gnu packages qt) |
| 46 | #:use-module (gnu packages serialization) |
| 47 | #:use-module (gnu packages sqlite) |
| 48 | #:use-module (gnu packages telephony) |
| 49 | #:use-module (gnu packages tls) |
| 50 | #:use-module (gnu packages upnp) |
| 51 | #:use-module (gnu packages version-control) |
| 52 | #:use-module (gnu packages video) |
| 53 | #:use-module (gnu packages webkit) |
| 54 | #:use-module (gnu packages xiph) |
| 55 | #:use-module (gnu packages xorg) |
| 56 | #:use-module (gnu packages) |
| 57 | #:use-module (guix build-system cmake) |
| 58 | #:use-module (guix build-system gnu) |
| 59 | #:use-module (guix build-system qt) |
| 60 | #:use-module (guix download) |
| 61 | #:use-module (guix git-download) |
| 62 | #:use-module (guix packages) |
| 63 | #:use-module (guix utils)) |
| 64 | |
| 65 | (define %jami-version "20210326.1.cfba013") |
| 66 | |
| 67 | (define* (jami-source #:key keep-contrib-patches?) |
| 68 | "Return an origin object of the tarball release sources archive of Jami. |
| 69 | When KEEP-CONTRIB-PATCHES? is #t, do not completely remove the contrib |
| 70 | subdirectory, which contains patches to be applied to some of the dependencies |
| 71 | of Jami." |
| 72 | (origin |
| 73 | (method url-fetch) |
| 74 | (uri (string-append "https://dl.jami.net/release/tarballs/jami_" |
| 75 | %jami-version |
| 76 | ".tar.gz")) |
| 77 | (modules '((guix build utils))) |
| 78 | (snippet |
| 79 | `(begin |
| 80 | ;; Delete multiple MiBs of bundled tarballs. The contrib directory |
| 81 | ;; contains the custom patches for pjproject and other libraries used |
| 82 | ;; by Savoir-faire Linux. |
| 83 | (if ,keep-contrib-patches? |
| 84 | (delete-file-recursively "daemon/contrib/tarballs") |
| 85 | (delete-file-recursively "daemon/contrib")) |
| 86 | ;; Remove code from unused Jami clients. |
| 87 | (for-each delete-file-recursively '("client-android" |
| 88 | "client-electron" |
| 89 | "client-ios" |
| 90 | "client-macosx" |
| 91 | "client-uwp")))) |
| 92 | (sha256 |
| 93 | (base32 |
| 94 | "1h0avma8bdzyznkz39crjyv2888bii4f49md15jg7970dyp5pdyz")))) |
| 95 | |
| 96 | (define %sfl-patches (jami-source #:keep-contrib-patches? #t)) |
| 97 | |
| 98 | (define %jami-sources (jami-source)) |
| 99 | |
| 100 | ;; Savoir-faire Linux maintains a set of patches for some key dependencies |
| 101 | ;; (currently pjproject and ffmpeg) of Jami that haven't yet been integrated |
| 102 | ;; upstream. This procedure simplifies the process of applying these patches.x |
| 103 | (define jami-apply-dependency-patches |
| 104 | '(lambda* (#:key inputs dep-name patches) |
| 105 | (let ((patches-directory "sfl-patches")) |
| 106 | (mkdir-p patches-directory) |
| 107 | (invoke "tar" "-xvf" (assoc-ref inputs "sfl-patches") |
| 108 | "-C" patches-directory |
| 109 | "--strip-components=5" |
| 110 | (string-append "ring-project/daemon/contrib/src/" |
| 111 | dep-name)) |
| 112 | (for-each |
| 113 | (lambda (file) |
| 114 | (invoke "patch" "--force" "--ignore-whitespace" "-p1" "-i" |
| 115 | (string-append patches-directory "/" |
| 116 | file ".patch"))) |
| 117 | patches)))) |
| 118 | |
| 119 | ;;; Jami maintains pjproject patches that add the ability to do ICE over TCP, |
| 120 | ;;; among other things. The patches are currently based on pjproject 2.10. |
| 121 | (define-public pjproject-jami |
| 122 | (package |
| 123 | (inherit pjproject) |
| 124 | (name "pjproject-jami") |
| 125 | (version "2.10") |
| 126 | (source (origin |
| 127 | (method git-fetch) |
| 128 | (uri (git-reference |
| 129 | (url "https://github.com/pjsip/pjproject") |
| 130 | (commit version))) |
| 131 | (file-name (git-file-name name version)) |
| 132 | (sha256 |
| 133 | (base32 |
| 134 | "1aklicpgwc88578k03i5d5cm5h8mfm7hmx8vfprchbmaa2p8f4z0")) |
| 135 | (patches (search-patches |
| 136 | "pjproject-correct-the-cflags-field.patch" |
| 137 | "pjproject-fix-pkg-config-ldflags.patch")))) |
| 138 | (native-inputs |
| 139 | `(("sfl-patches" ,%sfl-patches) |
| 140 | ,@(package-native-inputs pjproject))) |
| 141 | (arguments |
| 142 | (substitute-keyword-arguments (package-arguments pjproject) |
| 143 | ((#:phases phases '%standard-phases) |
| 144 | `(modify-phases ,phases |
| 145 | (add-after 'make-source-files-writable 'apply-patches |
| 146 | (lambda* (#:key inputs #:allow-other-keys) |
| 147 | (,jami-apply-dependency-patches |
| 148 | #:inputs inputs |
| 149 | #:dep-name "pjproject" |
| 150 | #:patches |
| 151 | '("0001-rfc6544" |
| 152 | "0002-rfc2466" |
| 153 | "0003-add-tcp-keep-alive" |
| 154 | "0004-multiple_listeners" |
| 155 | "0005-fix_ebusy_turn" |
| 156 | "0006-ignore_ipv6_on_transport_check" |
| 157 | "0007-upnp-srflx-nat-assisted-cand" |
| 158 | "0008-fix_ioqueue_ipv6_sendto" |
| 159 | "0009-add-config-site" |
| 160 | ;; Already taken care of via the origin patches. |
| 161 | ;;"0010-fix-pkgconfig" |
| 162 | "0011-fix-tcp-death-detection" |
| 163 | "0012-fix-turn-shutdown-crash" |
| 164 | "0013-Assign-unique-local-preferences-for-candidates-with-" |
| 165 | "0014-Add-new-compile-time-setting-PJ_ICE_ST_USE_TURN_PERM" |
| 166 | "0015-update-local-preference-for-peer-reflexive-candidate" |
| 167 | "0016-use-addrinfo-instead-CFHOST" |
| 168 | "0017-CVE-2020-15260" |
| 169 | "0018-CVE-2021-21375")))))))))) |
| 170 | |
| 171 | ;; The following variables are configure flags used by ffmpeg-jami. They're |
| 172 | ;; from the ring-project/daemon/contrib/src/ffmpeg/rules.mak file. We try to |
| 173 | ;; keep it as close to the official Jami package as possible, to provide all |
| 174 | ;; the codecs and extra features that are expected. |
| 175 | ;; |
| 176 | ;; See: |
| 177 | ;; https://review.jami.net/plugins/gitiles/ring-daemon/+/refs/heads/master/contrib/src/ffmpeg/rules.mak |
| 178 | |
| 179 | (define %ffmpeg-default-configure-flags |
| 180 | '("--disable-everything" |
| 181 | "--enable-zlib" |
| 182 | "--enable-gpl" |
| 183 | "--enable-swscale" |
| 184 | "--enable-bsfs" |
| 185 | "--disable-filters" |
| 186 | "--disable-programs" |
| 187 | "--disable-postproc" |
| 188 | "--disable-protocols" |
| 189 | "--enable-protocol=crypto" |
| 190 | "--enable-protocol=file" |
| 191 | "--enable-protocol=rtp" |
| 192 | "--enable-protocol=srtp" |
| 193 | "--enable-protocol=tcp" |
| 194 | "--enable-protocol=udp" |
| 195 | "--enable-protocol=unix" |
| 196 | "--enable-protocol=pipe" |
| 197 | |
| 198 | ;; enable muxers/demuxers |
| 199 | "--disable-demuxers" |
| 200 | "--disable-muxers" |
| 201 | "--enable-muxer=rtp" |
| 202 | "--enable-muxer=g722" |
| 203 | "--enable-muxer=h263" |
| 204 | "--enable-muxer=h264" |
| 205 | "--enable-muxer=hevc" |
| 206 | "--enable-muxer=webm" |
| 207 | "--enable-muxer=ogg" |
| 208 | "--enable-muxer=pcm_s16be" |
| 209 | "--enable-muxer=pcm_s16le" |
| 210 | "--enable-demuxer=rtp" |
| 211 | "--enable-demuxer=mjpeg" |
| 212 | "--enable-demuxer=mjpeg_2000" |
| 213 | "--enable-demuxer=mpegvideo" |
| 214 | "--enable-demuxer=gif" |
| 215 | "--enable-demuxer=image_jpeg_pipe" |
| 216 | "--enable-demuxer=image_png_pipe" |
| 217 | "--enable-demuxer=image_webp_pipe" |
| 218 | "--enable-demuxer=matroska" |
| 219 | "--enable-demuxer=m4v" |
| 220 | "--enable-demuxer=mp3" |
| 221 | "--enable-demuxer=ogg" |
| 222 | "--enable-demuxer=flac" |
| 223 | "--enable-demuxer=wav" |
| 224 | "--enable-demuxer=ac3" |
| 225 | "--enable-demuxer=g722" |
| 226 | "--enable-demuxer=pcm_mulaw" |
| 227 | "--enable-demuxer=pcm_alaw" |
| 228 | "--enable-demuxer=pcm_s16be" |
| 229 | "--enable-demuxer=pcm_s16le" |
| 230 | "--enable-demuxer=h263" |
| 231 | "--enable-demuxer=h264" |
| 232 | "--enable-demuxer=hevc" |
| 233 | |
| 234 | ;; enable parsers |
| 235 | "--enable-parser=h263" |
| 236 | "--enable-parser=h264" |
| 237 | "--enable-parser=hevc" |
| 238 | "--enable-parser=mpeg4video" |
| 239 | "--enable-parser=vp8" |
| 240 | "--enable-parser=vp9" |
| 241 | "--enable-parser=opus" |
| 242 | |
| 243 | ;; encoders/decoders |
| 244 | "--enable-encoder=adpcm_g722" |
| 245 | "--enable-decoder=adpcm_g722" |
| 246 | "--enable-encoder=rawvideo" |
| 247 | "--enable-decoder=rawvideo" |
| 248 | "--enable-encoder=libx264" |
| 249 | "--enable-decoder=h264" |
| 250 | "--enable-encoder=pcm_alaw" |
| 251 | "--enable-decoder=pcm_alaw" |
| 252 | "--enable-encoder=pcm_mulaw" |
| 253 | "--enable-decoder=pcm_mulaw" |
| 254 | "--enable-encoder=mpeg4" |
| 255 | "--enable-decoder=mpeg4" |
| 256 | "--enable-encoder=libvpx_vp8" |
| 257 | "--enable-decoder=vp8" |
| 258 | "--enable-decoder=vp9" |
| 259 | "--enable-encoder=h263" |
| 260 | "--enable-encoder=h263p" |
| 261 | "--enable-decoder=h263" |
| 262 | "--enable-encoder=mjpeg" |
| 263 | "--enable-decoder=mjpeg" |
| 264 | "--enable-decoder=mjpegb" |
| 265 | "--enable-libspeex" |
| 266 | "--enable-libopus" |
| 267 | "--enable-libvpx" |
| 268 | "--enable-libx264" |
| 269 | "--enable-encoder=libspeex" |
| 270 | "--enable-decoder=libspeex" |
| 271 | "--enable-encoder=libopus" |
| 272 | "--enable-decoder=libopus" |
| 273 | |
| 274 | ;; decoders for ringtones and audio streaming |
| 275 | "--enable-decoder=flac" |
| 276 | "--enable-decoder=vorbis" |
| 277 | "--enable-decoder=aac" |
| 278 | "--enable-decoder=ac3" |
| 279 | "--enable-decoder=eac3" |
| 280 | "--enable-decoder=mp3" |
| 281 | "--enable-decoder=pcm_u24be" |
| 282 | "--enable-decoder=pcm_u24le" |
| 283 | "--enable-decoder=pcm_u32be" |
| 284 | "--enable-decoder=pcm_u32le" |
| 285 | "--enable-decoder=pcm_u8" |
| 286 | "--enable-decoder=pcm_f16le" |
| 287 | "--enable-decoder=pcm_f24le" |
| 288 | "--enable-decoder=pcm_f32be" |
| 289 | "--enable-decoder=pcm_f32le" |
| 290 | "--enable-decoder=pcm_f64be" |
| 291 | "--enable-decoder=pcm_f64le" |
| 292 | "--enable-decoder=pcm_s16be" |
| 293 | "--enable-decoder=pcm_s16be_planar" |
| 294 | "--enable-decoder=pcm_s16le" |
| 295 | "--enable-decoder=pcm_s16le_planar" |
| 296 | "--enable-decoder=pcm_s24be" |
| 297 | "--enable-decoder=pcm_s24le" |
| 298 | "--enable-decoder=pcm_s24le_planar" |
| 299 | "--enable-decoder=pcm_s32be" |
| 300 | "--enable-decoder=pcm_s32le" |
| 301 | "--enable-decoder=pcm_s32le_planar" |
| 302 | "--enable-decoder=pcm_s64be" |
| 303 | "--enable-decoder=pcm_s64le" |
| 304 | "--enable-decoder=pcm_s8" |
| 305 | "--enable-decoder=pcm_s8_planar" |
| 306 | "--enable-decoder=pcm_u16be" |
| 307 | "--enable-decoder=pcm_u16le" |
| 308 | |
| 309 | ;; encoders/decoders for images |
| 310 | "--enable-encoder=gif" |
| 311 | "--enable-decoder=gif" |
| 312 | "--enable-encoder=jpegls" |
| 313 | "--enable-decoder=jpegls" |
| 314 | "--enable-encoder=ljpeg" |
| 315 | "--enable-decoder=jpeg2000" |
| 316 | "--enable-encoder=png" |
| 317 | "--enable-decoder=png" |
| 318 | "--enable-encoder=bmp" |
| 319 | "--enable-decoder=bmp" |
| 320 | "--enable-encoder=tiff" |
| 321 | "--enable-decoder=tiff" |
| 322 | |
| 323 | ;; filters |
| 324 | "--enable-filter=scale" |
| 325 | "--enable-filter=overlay" |
| 326 | "--enable-filter=amix" |
| 327 | "--enable-filter=amerge" |
| 328 | "--enable-filter=aresample" |
| 329 | "--enable-filter=format" |
| 330 | "--enable-filter=aformat" |
| 331 | "--enable-filter=fps" |
| 332 | "--enable-filter=transpose" |
| 333 | "--enable-filter=pad")) |
| 334 | |
| 335 | (define %ffmpeg-linux-configure-flags |
| 336 | '("--enable-pic" |
| 337 | "--extra-cxxflags=-fPIC" |
| 338 | "--extra-cflags=-fPIC" |
| 339 | "--target-os=linux" |
| 340 | "--enable-indev=v4l2" |
| 341 | "--enable-indev=xcbgrab" |
| 342 | "--enable-vdpau" |
| 343 | "--enable-hwaccel=h264_vdpau" |
| 344 | "--enable-hwaccel=mpeg4_vdpau" |
| 345 | "--enable-vaapi" |
| 346 | "--enable-hwaccel=h264_vaapi" |
| 347 | "--enable-hwaccel=mpeg4_vaapi" |
| 348 | "--enable-hwaccel=h263_vaapi" |
| 349 | "--enable-hwaccel=vp8_vaapi" |
| 350 | "--enable-hwaccel=mjpeg_vaapi" |
| 351 | "--enable-hwaccel=hevc_vaapi" |
| 352 | "--enable-encoder=h264_vaapi" |
| 353 | "--enable-encoder=vp8_vaapi" |
| 354 | "--enable-encoder=mjpeg_vaapi" |
| 355 | "--enable-encoder=hevc_vaapi")) |
| 356 | |
| 357 | ;; ffnvcodec is not supported on ARM then we enable it here for i386 and |
| 358 | ;; x86_64 architectures. |
| 359 | (define %ffmpeg-linux-x86-configure-flags |
| 360 | '("--arch=x86" |
| 361 | "--enable-cuvid" |
| 362 | "--enable-ffnvcodec" |
| 363 | "--enable-nvdec" |
| 364 | "--enable-nvenc" |
| 365 | "--enable-hwaccel=h264_nvdec" |
| 366 | "--enable-hwaccel=hevc_nvdec" |
| 367 | "--enable-hwaccel=vp8_nvdec" |
| 368 | "--enable-hwaccel=mjpeg_nvdec" |
| 369 | "--enable-encoder=h264_nvenc" |
| 370 | "--enable-encoder=hevc_nvenc")) |
| 371 | |
| 372 | ;; This procedure composes the configure flags list for ffmpeg-jami. |
| 373 | (define (ffmpeg-compose-configure-flags) |
| 374 | (define (system=? s) |
| 375 | (string-prefix? s (%current-system))) |
| 376 | |
| 377 | `(,@%ffmpeg-default-configure-flags |
| 378 | ,@(if (string-contains (%current-system) "linux") |
| 379 | (if (or (system=? "i686") |
| 380 | (system=? "x86_64")) |
| 381 | (append %ffmpeg-linux-configure-flags |
| 382 | %ffmpeg-linux-x86-configure-flags) |
| 383 | %ffmpeg-linux-configure-flags) |
| 384 | '()))) |
| 385 | |
| 386 | (define-public ffmpeg-jami |
| 387 | (package/inherit ffmpeg |
| 388 | (name "ffmpeg-jami") |
| 389 | (native-inputs |
| 390 | `(("sfl-patches" ,%sfl-patches) |
| 391 | ("libiconv" ,libiconv) |
| 392 | ,@(package-native-inputs ffmpeg))) |
| 393 | (supported-systems '("x86_64-linux" "i686-linux" |
| 394 | "aarch64-linux" "armhf-linux")) |
| 395 | (arguments |
| 396 | (append |
| 397 | '(#:tests? #f) |
| 398 | (substitute-keyword-arguments (package-arguments ffmpeg) |
| 399 | ((#:configure-flags '()) |
| 400 | (ffmpeg-compose-configure-flags)) |
| 401 | ((#:phases phases) |
| 402 | `(modify-phases ,phases |
| 403 | (add-after 'unpack 'make-git-checkout-writable |
| 404 | (lambda _ |
| 405 | (for-each make-file-writable (find-files ".")))) |
| 406 | (add-after 'unpack 'apply-patches |
| 407 | (lambda* (#:key inputs #:allow-other-keys) |
| 408 | (let ((jami-apply-dependency-patches |
| 409 | ,jami-apply-dependency-patches)) |
| 410 | ;; These patches come from: |
| 411 | ;; "ring-project/daemon/contrib/src/ffmpeg/rules.mak". |
| 412 | (jami-apply-dependency-patches |
| 413 | #:inputs inputs |
| 414 | #:dep-name "ffmpeg" |
| 415 | #:patches |
| 416 | '("remove-mjpeg-log" |
| 417 | "change-RTCP-ratio" |
| 418 | "rtp_ext_abs_send_time" |
| 419 | "libopusdec-enable-FEC" |
| 420 | "libopusenc-enable-FEC")))))))))))) |
| 421 | |
| 422 | (define-public libring |
| 423 | (package |
| 424 | (name "libring") |
| 425 | (version %jami-version) |
| 426 | (source %jami-sources) |
| 427 | (build-system gnu-build-system) |
| 428 | (outputs '("out" "debug")) |
| 429 | (inputs |
| 430 | `(("alsa-lib" ,alsa-lib) |
| 431 | ("asio" ,asio) |
| 432 | ("dbus-c++" ,dbus-c++) |
| 433 | ("eudev" ,eudev) |
| 434 | ("ffmpeg" ,ffmpeg-jami) |
| 435 | ("jack" ,jack-1) |
| 436 | ("jsoncpp" ,jsoncpp) |
| 437 | ("libarchive" ,libarchive) |
| 438 | ("libgit2" ,libgit2) |
| 439 | ("libnatpmp" ,libnatpmp) |
| 440 | ("libsecp256k1" ,libsecp256k1) |
| 441 | ("libupnp" ,libupnp) |
| 442 | ("opendht" ,opendht) |
| 443 | ("openssl" ,openssl) |
| 444 | ("pjproject" ,pjproject-jami) |
| 445 | ("pulseaudio" ,pulseaudio) |
| 446 | ("speex" ,speex) |
| 447 | ("speexdsp" ,speexdsp) |
| 448 | ("webrtc-audio-processing" ,webrtc-audio-processing) |
| 449 | ("yaml-cpp" ,yaml-cpp))) |
| 450 | (native-inputs |
| 451 | `(("autoconf" ,autoconf) |
| 452 | ("automake" ,automake) |
| 453 | ("gcc" ,gcc-8) ;charconv requires GCC 8.1+ |
| 454 | ("libtool" ,libtool) |
| 455 | ("perl" ,perl) ;to generate manpages with pod2man |
| 456 | ("pkg-config" ,pkg-config) |
| 457 | ("which" ,which))) |
| 458 | (arguments |
| 459 | `(#:tests? #f ; The tests fail to compile due to missing headers. |
| 460 | #:make-flags '("V=1") ;build verbosely |
| 461 | #:phases |
| 462 | (modify-phases %standard-phases |
| 463 | (add-after 'unpack 'change-directory |
| 464 | (lambda _ |
| 465 | (chdir "daemon"))) |
| 466 | (add-before 'build 'add-lib-dir |
| 467 | (lambda _ |
| 468 | (mkdir-p "src/lib")))))) |
| 469 | (synopsis "Jami core library and daemon") |
| 470 | (description "This package provides a library and daemon implementing the |
| 471 | Jami core functionality. Jami is a secure and distributed voice, video and |
| 472 | chat communication platform that requires no centralized server and leaves the |
| 473 | power of privacy in the hands of the user. It supports the SIP and IAX |
| 474 | protocols, as well as decentralized calling using P2P-DHT.") |
| 475 | (home-page "https://jami.net/") |
| 476 | (license license:gpl3+))) |
| 477 | |
| 478 | (define-public libringclient |
| 479 | (package |
| 480 | (name "libringclient") |
| 481 | (version %jami-version) |
| 482 | (source %jami-sources) |
| 483 | (build-system cmake-build-system) |
| 484 | (outputs '("out" "debug")) |
| 485 | (inputs |
| 486 | `(("libring" ,libring) |
| 487 | ("network-manager" ,network-manager))) |
| 488 | (propagated-inputs |
| 489 | `(("qtbase" ,qtbase))) ; Qt is included in several installed headers. |
| 490 | (arguments |
| 491 | `(#:tests? #f ; There is no testsuite. |
| 492 | #:configure-flags |
| 493 | (let ((libring (assoc-ref %build-inputs "libring"))) |
| 494 | (list (string-append "-DRING_XML_INTERFACES_DIR=" |
| 495 | libring "/share/dbus-1/interfaces") |
| 496 | (string-append "-DRING_BUILD_DIR=" libring "/include") |
| 497 | ;; Use LIBWRAP, which removes the requirement on DBus. Qt |
| 498 | ;; links with the dbus library in Guix, which expects to find |
| 499 | ;; its configuration under /etc rather than /usr/share/dbus-1, |
| 500 | ;; which is perhaps the reason the auto-launching of dring |
| 501 | ;; doesn't work on foreign distributions. |
| 502 | |
| 503 | ;; FIXME: Disabled for now, as it causes a segfault when |
| 504 | ;; attempting video calls (see: |
| 505 | ;; https://git.jami.net/savoirfairelinux/ring-lrc/-/issues/466). |
| 506 | "-DENABLE_LIBWRAP=false")) |
| 507 | #:phases |
| 508 | (modify-phases %standard-phases |
| 509 | (add-after 'unpack 'change-directory |
| 510 | (lambda _ |
| 511 | (chdir "lrc")))))) |
| 512 | (synopsis "Jami client library") |
| 513 | (description "This package provides a library common to all Jami clients. |
| 514 | Jami is a secure and distributed voice, video and chat communication platform |
| 515 | that requires no centralized server and leaves the power of privacy in the |
| 516 | hands of the user. It supports the SIP and IAX protocols, as well as |
| 517 | decentralized calling using P2P-DHT.") |
| 518 | (home-page "https://jami.net") |
| 519 | (license license:gpl3+))) |
| 520 | |
| 521 | (define-public jami-gnome |
| 522 | (package |
| 523 | (name "jami-gnome") |
| 524 | (version %jami-version) |
| 525 | (source %jami-sources) |
| 526 | (build-system cmake-build-system) |
| 527 | (outputs '("out" "debug")) |
| 528 | (inputs |
| 529 | `(("clutter" ,clutter) |
| 530 | ("clutter-gtk" ,clutter-gtk) |
| 531 | ("gtk+" ,gtk+) |
| 532 | ("libcanberra" ,libcanberra) |
| 533 | ("libappindicator" ,libappindicator) |
| 534 | ("libnotify" ,libnotify) |
| 535 | ("libringclient" ,libringclient) |
| 536 | ("network-manager" ,network-manager) |
| 537 | ("qrencode" ,qrencode) |
| 538 | ("sqlite" ,sqlite) |
| 539 | ("webkitgtk" ,webkitgtk))) |
| 540 | (native-inputs |
| 541 | `(("pkg-config" ,pkg-config) |
| 542 | ("gettext" ,gettext-minimal) |
| 543 | ("glib:bin" ,glib "bin"))) ;for glib-compile-resources |
| 544 | (propagated-inputs |
| 545 | `(("libring" ,libring) ; Contains 'dring', the daemon, which is |
| 546 | ; automatically started by DBus. |
| 547 | ("adwaita-icon-theme" ,adwaita-icon-theme))) |
| 548 | (arguments |
| 549 | `(#:tests? #f ; There is no testsuite. |
| 550 | #:phases |
| 551 | (modify-phases %standard-phases |
| 552 | (add-after 'unpack 'change-directory |
| 553 | (lambda _ |
| 554 | (chdir "client-gnome")))))) |
| 555 | (synopsis "Jami client for GNOME") |
| 556 | (description "This package provides a Jami client for the GNOME desktop. |
| 557 | Jami is a secure and distributed voice, video and chat communication platform |
| 558 | that requires no centralized server and leaves the power of privacy in the |
| 559 | hands of the user. It supports the SIP and IAX protocols, as well as |
| 560 | decentralized calling using P2P-DHT.") |
| 561 | (home-page "https://jami.net") |
| 562 | (license license:gpl3+))) |
| 563 | |
| 564 | ;;; Keep this until the Qt client matures enough to become the |
| 565 | ;;; main 'jami' client. |
| 566 | (define-public jami |
| 567 | (deprecated-package "jami" jami-gnome)) |
| 568 | |
| 569 | (define-public jami-qt |
| 570 | (package |
| 571 | (name "jami-qt") ;to be renamed 'jami' at some point |
| 572 | (version %jami-version) |
| 573 | ;; The Qt client code is not yet part of the release tarball; fetch it |
| 574 | ;; from git for now. |
| 575 | (source (origin |
| 576 | (method git-fetch) |
| 577 | (uri (git-reference |
| 578 | (url "https://git.jami.net/savoirfairelinux/jami-client-qt.git") |
| 579 | (commit "ae21c17da5e8f730ae3895ccbc4da8047e3be1eb"))) |
| 580 | (file-name (git-file-name name version)) |
| 581 | (sha256 |
| 582 | (base32 |
| 583 | "1rf3lpk8c4qc12pi6pn4rdp7i8b83xv64yqr0q47rzv9s518qyjp")))) |
| 584 | (build-system qt-build-system) |
| 585 | (outputs '("out" "debug")) |
| 586 | (arguments |
| 587 | `(#:tests? #f ;no test suite |
| 588 | ;; TODO: Uncomment after switching back to the tarball source. |
| 589 | ;; #:phases |
| 590 | ;; (modify-phases %standard-phases |
| 591 | ;; (add-after 'unpack 'change-directory |
| 592 | ;; (lambda _ |
| 593 | ;; (chdir "client-qt")))) |
| 594 | )) |
| 595 | (native-inputs |
| 596 | `(("pkg-config" ,pkg-config) |
| 597 | ("qttools" ,qttools) |
| 598 | ("doxygen" ,doxygen) |
| 599 | ("graphviz" ,graphviz))) |
| 600 | (inputs |
| 601 | `(("libringclient" ,libringclient) |
| 602 | ("network-manager" ,network-manager) |
| 603 | ("qrencode" ,qrencode) |
| 604 | ("qtsvg" ,qtsvg) |
| 605 | ("qtwebengine" ,qtwebengine) |
| 606 | ("qtwebchannel" ,qtwebchannel) |
| 607 | ("qtmultimedia" ,qtmultimedia) |
| 608 | ("qtdeclarative" ,qtdeclarative) |
| 609 | ("qtgraphicaleffects" ,qtgraphicaleffects) |
| 610 | ("qtquickcontrols" ,qtquickcontrols) |
| 611 | ("qtquickcontrols2" ,qtquickcontrols2))) |
| 612 | (propagated-inputs |
| 613 | `(("libring" ,libring))) ;for dring |
| 614 | (home-page "https://jami.net") |
| 615 | (synopsis "Qt Jami client") |
| 616 | (description "This package provides the Jami Qt client. Jami is a secure |
| 617 | and distributed voice, video and chat communication platform that requires no |
| 618 | centralized server and leaves the power of privacy in the hands of the user. |
| 619 | It supports the SIP and IAX protocols, as well as decentralized calling using |
| 620 | P2P-DHT.") |
| 621 | (license license:gpl3+))) |