Commit | Line | Data |
---|---|---|
15c6e426 JW |
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 | ;;; | |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | (define-module (gnu packages jami) | |
22 | #:use-module ((guix licenses) #:prefix license:) | |
23 | #:use-module (gnu packages aidc) | |
24 | #:use-module (gnu packages audio) | |
25 | #:use-module (gnu packages autotools) | |
1c15d305 | 26 | #:use-module (gnu packages backup) |
15c6e426 JW |
27 | #:use-module (gnu packages base) |
28 | #:use-module (gnu packages boost) | |
29 | #:use-module (gnu packages check) | |
30 | #:use-module (gnu packages compression) | |
31 | #:use-module (gnu packages crypto) | |
32 | #:use-module (gnu packages documentation) | |
33 | #:use-module (gnu packages gettext) | |
34 | #:use-module (gnu packages glib) | |
35 | #:use-module (gnu packages gnome) | |
36 | #:use-module (gnu packages gtk) | |
8c98eb28 | 37 | #:use-module (gnu packages hurd) |
15c6e426 JW |
38 | #:use-module (gnu packages libcanberra) |
39 | #:use-module (gnu packages linux) | |
40 | #:use-module (gnu packages multiprecision) | |
41 | #:use-module (gnu packages networking) | |
42 | #:use-module (gnu packages pcre) | |
43 | #:use-module (gnu packages perl) | |
44 | #:use-module (gnu packages pkg-config) | |
45 | #:use-module (gnu packages pulseaudio) | |
46 | #:use-module (gnu packages python) | |
47 | #:use-module (gnu packages qt) | |
48 | #:use-module (gnu packages serialization) | |
49 | #:use-module (gnu packages sqlite) | |
50 | #:use-module (gnu packages telephony) | |
51 | #:use-module (gnu packages tls) | |
52 | #:use-module (gnu packages upnp) | |
53 | #:use-module (gnu packages video) | |
54 | #:use-module (gnu packages webkit) | |
55 | #:use-module (gnu packages xiph) | |
56 | #:use-module (gnu packages xorg) | |
57 | #:use-module (gnu packages) | |
58 | #:use-module (guix build-system cmake) | |
59 | #:use-module (guix build-system gnu) | |
60 | #:use-module (guix download) | |
61 | #:use-module (guix git-download) | |
62 | #:use-module (guix packages) | |
da358e8c JW |
63 | #:use-module (guix utils) |
64 | #:use-module (srfi srfi-1)) | |
15c6e426 | 65 | |
1c15d305 | 66 | (define %jami-version "20200710.1.6bd18d2") |
15c6e426 JW |
67 | |
68 | (define* (jami-source #:key without-daemon) | |
69 | (origin | |
70 | (method url-fetch) | |
aaa199ca | 71 | (uri (string-append "https://dl.jami.net/release/tarballs/jami_" |
15c6e426 JW |
72 | %jami-version |
73 | ".tar.gz")) | |
74 | (modules '((guix build utils))) | |
75 | (snippet | |
76 | (if without-daemon | |
77 | '(begin | |
78 | (delete-file-recursively "daemon/contrib")) | |
79 | #f)) | |
80 | (sha256 | |
81 | (base32 | |
1c15d305 | 82 | "0lg61jv39x7kc9lq30by246xb6gcgp1rzj49ak7ff8nqpfzyfvva")))) |
15c6e426 | 83 | |
f60699af JW |
84 | ;; Savoir-Faire Linux modifies many libraries to add features |
85 | ;; to Jami. This procedure makes applying patches to a given | |
86 | ;; package easy. | |
87 | (define jami-apply-dependency-patches | |
88 | '(lambda* (#:key inputs dep-name patches) | |
89 | (let ((patches-directory "sfl-patches")) | |
90 | (mkdir-p patches-directory) | |
91 | (invoke "tar" "-xvf" (assoc-ref inputs "sfl-patches") | |
92 | "-C" patches-directory | |
93 | "--strip-components=5" | |
94 | (string-append "ring-project/daemon/contrib/src/" | |
95 | dep-name)) | |
96 | (for-each | |
97 | (lambda (file) | |
98 | (invoke "patch" "--force" "-p1" "-i" | |
99 | (string-append patches-directory "/" | |
100 | file ".patch"))) | |
101 | patches)))) | |
102 | ||
15c6e426 JW |
103 | (define-public pjproject-jami |
104 | (package | |
105 | (inherit pjproject) | |
106 | (name "pjproject-jami") | |
107 | (native-inputs | |
f60699af | 108 | `(("sfl-patches" ,(jami-source)) |
15c6e426 JW |
109 | ,@(package-native-inputs pjproject))) |
110 | (arguments | |
111 | `(#:tests? #f | |
112 | ;; See ring-project/daemon/contrib/src/pjproject/rules.mak. | |
113 | #:configure-flags | |
114 | (list "--disable-oss" | |
115 | "--disable-sound" | |
116 | "--disable-video" | |
8c98eb28 JW |
117 | ;; The following flag is Linux specific. |
118 | ,@(if (hurd-triplet? (or (%current-system) | |
119 | (%current-target-system))) | |
120 | '() | |
121 | '("--enable-epoll")) | |
15c6e426 JW |
122 | "--enable-ext-sound" |
123 | "--disable-speex-aec" | |
124 | "--disable-g711-codec" | |
125 | "--disable-l16-codec" | |
126 | "--disable-gsm-codec" | |
127 | "--disable-g722-codec" | |
128 | "--disable-g7221-codec" | |
129 | "--disable-speex-codec" | |
130 | "--disable-ilbc-codec" | |
131 | "--disable-opencore-amr" | |
132 | "--disable-silk" | |
133 | "--disable-sdl" | |
134 | "--disable-ffmpeg" | |
135 | "--disable-v4l2" | |
136 | "--disable-openh264" | |
137 | "--disable-resample" | |
138 | "--disable-libwebrtc" | |
139 | "--with-gnutls" | |
140 | "--with-external-srtp" | |
141 | ;; We need -fPIC or else we get the following error when linking | |
142 | ;; against pjproject-jami: | |
143 | ;; relocation R_X86_64_32S against `.rodata' can not be used when | |
144 | ;; making a shared object; | |
c54b9afb JW |
145 | ;; -DNDEBUG is needed to prevent assertion from happening and |
146 | ;; stopping the daemon. | |
147 | "CFLAGS=-fPIC -DNDEBUG" | |
148 | "CXXFLAGS=-fPIC -DNDEBUG") | |
15c6e426 JW |
149 | #:phases |
150 | (modify-phases %standard-phases | |
151 | (add-after 'unpack 'make-git-checkout-writable | |
152 | (lambda _ | |
153 | (for-each make-file-writable (find-files ".")) | |
154 | #t)) | |
155 | (add-after 'unpack 'apply-patches | |
156 | (lambda* (#:key inputs #:allow-other-keys) | |
f60699af JW |
157 | (let ((jami-apply-dependency-patches ,jami-apply-dependency-patches)) |
158 | ;; Comes from | |
159 | ;; "ring-project/daemon/contrib/src/pjproject/rules.mak". | |
160 | ;; WARNING: These amount for huge changes in pjproject. | |
161 | (jami-apply-dependency-patches | |
162 | #:inputs inputs | |
163 | #:dep-name "pjproject" | |
164 | #:patches | |
2ff4e549 JW |
165 | '("0001-rfc6544" |
166 | "0002-rfc2466" | |
167 | "0003-add-tcp-keep-alive" | |
168 | "0004-multiple_listeners" | |
169 | "0005-fix_ebusy_turn" | |
170 | "0006-ignore_ipv6_on_transport_check" | |
171 | "0007-pj_ice_sess" | |
172 | "0008-fix_ioqueue_ipv6_sendto" | |
1c15d305 | 173 | "0009-add-config-site" |
839bb42f MC |
174 | ;; Note: The base pjproject is already patched with |
175 | ;; "0010-fix-pkgconfig". | |
1c15d305 JW |
176 | "0011-fix-tcp-death-detection" |
177 | "0012-fix-turn-shutdown-crash")) | |
f60699af | 178 | #t))) |
15c6e426 JW |
179 | ;; TODO: We could use substitute-keyword-arguments instead of |
180 | ;; repeating the phases from pjproject, but somehow it does | |
181 | ;; not work. | |
182 | (add-before 'build 'build-dep | |
183 | (lambda _ (invoke "make" "dep"))) | |
184 | (add-before 'patch-source-shebangs 'autoconf | |
185 | (lambda _ | |
186 | (invoke "autoconf" "-v" "-f" "-i" "-o" | |
187 | "aconfigure" "aconfigure.ac"))) | |
188 | (add-before 'autoconf 'disable-some-tests | |
189 | ;; Three of the six test programs fail due to missing network | |
190 | ;; access. | |
191 | (lambda _ | |
192 | (substitute* "Makefile" | |
193 | (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test") | |
194 | "selftest: pjlib-test pjlib-util-test pjmedia-test")) | |
195 | #t))))))) | |
196 | ||
da358e8c JW |
197 | ;; The following variables are configure flags used by ffmpeg-jami. They're |
198 | ;; from the ring-project/daemon/contrib/src/ffmpeg/rules.mak file. We try to | |
199 | ;; keep it as close to the official Jami package as possible, to provide all | |
200 | ;; the codecs and extra features that are expected. | |
201 | ;; | |
202 | ;; See: | |
203 | ;; https://review.jami.net/plugins/gitiles/ring-daemon/+/refs/heads/master/contrib/src/ffmpeg/rules.mak | |
204 | ||
205 | (define %ffmpeg-default-configure-flags | |
206 | '("--disable-everything" | |
207 | "--enable-zlib" | |
208 | "--enable-gpl" | |
209 | "--enable-swscale" | |
210 | "--enable-bsfs" | |
211 | "--disable-filters" | |
212 | "--disable-programs" | |
213 | "--disable-postproc" | |
214 | "--disable-protocols" | |
215 | "--enable-protocol=crypto" | |
216 | "--enable-protocol=file" | |
217 | "--enable-protocol=rtp" | |
218 | "--enable-protocol=srtp" | |
219 | "--enable-protocol=tcp" | |
220 | "--enable-protocol=udp" | |
221 | "--enable-protocol=unix" | |
222 | "--enable-protocol=pipe" | |
223 | ||
224 | ;; enable muxers/demuxers | |
225 | "--disable-demuxers" | |
226 | "--disable-muxers" | |
227 | "--enable-muxer=rtp" | |
228 | "--enable-muxer=g722" | |
229 | "--enable-muxer=h263" | |
230 | "--enable-muxer=h264" | |
231 | "--enable-muxer=hevc" | |
232 | "--enable-muxer=webm" | |
233 | "--enable-muxer=ogg" | |
234 | "--enable-muxer=pcm_s16be" | |
235 | "--enable-muxer=pcm_s16le" | |
236 | "--enable-demuxer=rtp" | |
237 | "--enable-demuxer=mjpeg" | |
238 | "--enable-demuxer=mjpeg_2000" | |
239 | "--enable-demuxer=mpegvideo" | |
240 | "--enable-demuxer=gif" | |
241 | "--enable-demuxer=image_jpeg_pipe" | |
242 | "--enable-demuxer=image_png_pipe" | |
243 | "--enable-demuxer=image_webp_pipe" | |
244 | "--enable-demuxer=matroska" | |
245 | "--enable-demuxer=m4v" | |
246 | "--enable-demuxer=mp3" | |
247 | "--enable-demuxer=ogg" | |
248 | "--enable-demuxer=flac" | |
249 | "--enable-demuxer=wav" | |
250 | "--enable-demuxer=ac3" | |
251 | "--enable-demuxer=g722" | |
252 | "--enable-demuxer=pcm_mulaw" | |
253 | "--enable-demuxer=pcm_alaw" | |
254 | "--enable-demuxer=pcm_s16be" | |
255 | "--enable-demuxer=pcm_s16le" | |
256 | "--enable-demuxer=h263" | |
257 | "--enable-demuxer=h264" | |
258 | "--enable-demuxer=hevc" | |
259 | ||
260 | ;; enable parsers | |
261 | "--enable-parser=h263" | |
262 | "--enable-parser=h264" | |
263 | "--enable-parser=hevc" | |
264 | "--enable-parser=mpeg4video" | |
265 | "--enable-parser=vp8" | |
266 | "--enable-parser=vp9" | |
267 | "--enable-parser=opus" | |
268 | ||
269 | ;; encoders/decoders | |
270 | "--enable-encoder=adpcm_g722" | |
271 | "--enable-decoder=adpcm_g722" | |
272 | "--enable-encoder=rawvideo" | |
273 | "--enable-decoder=rawvideo" | |
274 | "--enable-encoder=libx264" | |
275 | "--enable-decoder=h264" | |
276 | "--enable-encoder=pcm_alaw" | |
277 | "--enable-decoder=pcm_alaw" | |
278 | "--enable-encoder=pcm_mulaw" | |
279 | "--enable-decoder=pcm_mulaw" | |
280 | "--enable-encoder=mpeg4" | |
281 | "--enable-decoder=mpeg4" | |
282 | "--enable-encoder=libvpx_vp8" | |
283 | "--enable-decoder=vp8" | |
284 | "--enable-decoder=vp9" | |
285 | "--enable-encoder=h263" | |
286 | "--enable-encoder=h263p" | |
287 | "--enable-decoder=h263" | |
288 | "--enable-encoder=mjpeg" | |
289 | "--enable-decoder=mjpeg" | |
290 | "--enable-decoder=mjpegb" | |
291 | "--enable-libspeex" | |
292 | "--enable-libopus" | |
293 | "--enable-libvpx" | |
294 | "--enable-libx264" | |
295 | "--enable-encoder=libspeex" | |
296 | "--enable-decoder=libspeex" | |
297 | "--enable-encoder=libopus" | |
298 | "--enable-decoder=libopus" | |
299 | ||
300 | ;; decoders for ringtones and audio streaming | |
301 | "--enable-decoder=flac" | |
302 | "--enable-decoder=vorbis" | |
303 | "--enable-decoder=aac" | |
304 | "--enable-decoder=ac3" | |
305 | "--enable-decoder=eac3" | |
306 | "--enable-decoder=mp3" | |
307 | "--enable-decoder=pcm_u24be" | |
308 | "--enable-decoder=pcm_u24le" | |
309 | "--enable-decoder=pcm_u32be" | |
310 | "--enable-decoder=pcm_u32le" | |
311 | "--enable-decoder=pcm_u8" | |
312 | "--enable-decoder=pcm_f16le" | |
313 | "--enable-decoder=pcm_f24le" | |
314 | "--enable-decoder=pcm_f32be" | |
315 | "--enable-decoder=pcm_f32le" | |
316 | "--enable-decoder=pcm_f64be" | |
317 | "--enable-decoder=pcm_f64le" | |
318 | "--enable-decoder=pcm_s16be" | |
319 | "--enable-decoder=pcm_s16be_planar" | |
320 | "--enable-decoder=pcm_s16le" | |
321 | "--enable-decoder=pcm_s16le_planar" | |
322 | "--enable-decoder=pcm_s24be" | |
323 | "--enable-decoder=pcm_s24le" | |
324 | "--enable-decoder=pcm_s24le_planar" | |
325 | "--enable-decoder=pcm_s32be" | |
326 | "--enable-decoder=pcm_s32le" | |
327 | "--enable-decoder=pcm_s32le_planar" | |
328 | "--enable-decoder=pcm_s64be" | |
329 | "--enable-decoder=pcm_s64le" | |
330 | "--enable-decoder=pcm_s8" | |
331 | "--enable-decoder=pcm_s8_planar" | |
332 | "--enable-decoder=pcm_u16be" | |
333 | "--enable-decoder=pcm_u16le" | |
334 | ||
335 | ;; encoders/decoders for images | |
336 | "--enable-encoder=gif" | |
337 | "--enable-decoder=gif" | |
338 | "--enable-encoder=jpegls" | |
339 | "--enable-decoder=jpegls" | |
340 | "--enable-encoder=ljpeg" | |
341 | "--enable-decoder=jpeg2000" | |
342 | "--enable-encoder=png" | |
343 | "--enable-decoder=png" | |
344 | "--enable-encoder=bmp" | |
345 | "--enable-decoder=bmp" | |
346 | "--enable-encoder=tiff" | |
347 | "--enable-decoder=tiff" | |
348 | ||
349 | ;; filters | |
350 | "--enable-filter=scale" | |
351 | "--enable-filter=overlay" | |
352 | "--enable-filter=amix" | |
353 | "--enable-filter=amerge" | |
354 | "--enable-filter=aresample" | |
355 | "--enable-filter=format" | |
356 | "--enable-filter=aformat" | |
357 | "--enable-filter=fps" | |
358 | "--enable-filter=transpose" | |
359 | "--enable-filter=pad")) | |
360 | ||
361 | (define %ffmpeg-linux-configure-flags | |
362 | '("--enable-pic" | |
363 | "--extra-cxxflags=-fPIC" | |
364 | "--extra-cflags=-fPIC" | |
365 | "--target-os=linux" | |
366 | "--enable-indev=v4l2" | |
367 | "--enable-indev=xcbgrab" | |
368 | "--enable-vdpau" | |
369 | "--enable-hwaccel=h264_vdpau" | |
370 | "--enable-hwaccel=mpeg4_vdpau" | |
371 | "--enable-vaapi" | |
372 | "--enable-hwaccel=h264_vaapi" | |
373 | "--enable-hwaccel=mpeg4_vaapi" | |
374 | "--enable-hwaccel=h263_vaapi" | |
375 | "--enable-hwaccel=vp8_vaapi" | |
376 | "--enable-hwaccel=mjpeg_vaapi" | |
377 | "--enable-hwaccel=hevc_vaapi" | |
378 | "--enable-encoder=h264_vaapi" | |
379 | "--enable-encoder=vp8_vaapi" | |
380 | "--enable-encoder=mjpeg_vaapi" | |
381 | "--enable-encoder=hevc_vaapi")) | |
382 | ||
383 | ;; ffnvcodec is not supported on ARM then we enable it here for i386 and | |
384 | ;; x86_64 architectures. | |
385 | (define %ffmpeg-linux-x86-configure-flags | |
386 | '("--arch=x86" | |
387 | "--enable-cuvid" | |
388 | "--enable-ffnvcodec" | |
389 | "--enable-nvdec" | |
390 | "--enable-nvenc" | |
391 | "--enable-hwaccel=h264_nvdec" | |
392 | "--enable-hwaccel=hevc_nvdec" | |
393 | "--enable-hwaccel=vp8_nvdec" | |
394 | "--enable-hwaccel=mjpeg_nvdec" | |
395 | "--enable-encoder=h264_nvenc" | |
396 | "--enable-encoder=hevc_nvenc")) | |
397 | ||
398 | ;; This procedure composes the configure flags list for ffmpeg-jami. | |
399 | (define (ffmpeg-compose-configure-flags) | |
400 | (define (system=? s) | |
401 | (string-prefix? s (%current-system))) | |
402 | ||
403 | `(,@%ffmpeg-default-configure-flags | |
404 | ,@(if (string-contains (%current-system) "linux") | |
405 | (if (or (system=? "i686") | |
406 | (system=? "x86_64")) | |
407 | (append %ffmpeg-linux-configure-flags | |
408 | %ffmpeg-linux-x86-configure-flags) | |
409 | %ffmpeg-linux-configure-flags) | |
410 | '()))) | |
411 | ||
412 | (define-public ffmpeg-jami | |
413 | (package | |
414 | (inherit ffmpeg) | |
415 | (name "ffmpeg-jami") | |
416 | (native-inputs | |
417 | `(("sfl-patches" ,(jami-source)) | |
418 | ("libiconv" ,libiconv) | |
419 | ,@(package-native-inputs ffmpeg))) | |
420 | (supported-systems '("x86_64-linux" "i686-linux" | |
421 | "aarch64-linux" "armhf-linux")) | |
422 | (arguments | |
423 | (append | |
424 | '(#:tests? #f) | |
425 | (substitute-keyword-arguments (package-arguments ffmpeg) | |
426 | ((#:configure-flags '()) | |
427 | (ffmpeg-compose-configure-flags)) | |
428 | ((#:phases phases) | |
429 | `(modify-phases ,phases | |
430 | (add-after 'unpack 'make-git-checkout-writable | |
431 | (lambda _ | |
432 | (for-each make-file-writable (find-files ".")) | |
433 | #t)) | |
434 | (add-after 'unpack 'apply-patches | |
435 | (lambda* (#:key inputs #:allow-other-keys) | |
436 | (let ((jami-apply-dependency-patches | |
437 | ,jami-apply-dependency-patches)) | |
438 | ;; These patches come from: | |
439 | ;; "ring-project/daemon/contrib/src/ffmpeg/rules.mak". | |
440 | (jami-apply-dependency-patches #:inputs inputs | |
441 | #:dep-name "ffmpeg" | |
442 | #:patches | |
443 | '("remove-mjpeg-log" | |
444 | "change-RTCP-ratio" | |
445 | "rtp_ext_abs_send_time")) | |
446 | #t)))))))))) | |
447 | ||
15c6e426 JW |
448 | (define-public libring |
449 | (package | |
450 | (name "libring") | |
451 | (version %jami-version) | |
452 | (source (jami-source #:without-daemon #t)) | |
453 | (build-system gnu-build-system) | |
454 | (inputs | |
15c6e426 JW |
455 | `(("alsa-lib" ,alsa-lib) |
456 | ("boost" ,boost) | |
457 | ("dbus-c++" ,dbus-c++) | |
458 | ("eudev" ,eudev) | |
da358e8c | 459 | ("ffmpeg" ,ffmpeg-jami) |
15c6e426 JW |
460 | ("flac" ,flac) |
461 | ("gmp" ,gmp) | |
462 | ("gsm" ,gsm) | |
463 | ("jack" ,jack-1) | |
464 | ("jsoncpp" ,jsoncpp) | |
1c15d305 | 465 | ("libarchive" ,libarchive) |
63e6f1cd | 466 | ("libnatpmp" ,libnatpmp) |
15c6e426 JW |
467 | ("libogg" ,libogg) |
468 | ("libva" ,libva) | |
469 | ("opendht" ,opendht) | |
470 | ("opus" ,opus) | |
471 | ("pcre" ,pcre) | |
472 | ("pulseaudio" ,pulseaudio) | |
473 | ("libsamplerate" ,libsamplerate) | |
474 | ("libsndfile" ,libsndfile) | |
475 | ("speex" ,speex) | |
476 | ("speexdsp" ,speexdsp) | |
477 | ("libupnp" ,libupnp) | |
478 | ("libvorbis" ,libvorbis) | |
479 | ("libx264" ,libx264) | |
480 | ("libvdpau" ,libvdpau) | |
481 | ("yaml-cpp" ,yaml-cpp) | |
482 | ("zlib" ,zlib) | |
483 | ("openssl" ,openssl) | |
484 | ("libsecp256k1" ,libsecp256k1) | |
485 | ("python" ,python) | |
486 | ("python-wrapper" ,python-wrapper) | |
487 | ("restinio" ,restinio) | |
488 | ("libx11" ,libx11) | |
489 | ("asio" ,asio) | |
490 | ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version. | |
491 | ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24. | |
492 | ("pjproject" ,pjproject-jami))) | |
493 | (native-inputs | |
494 | `(("autoconf" ,autoconf) | |
495 | ("automake" ,automake) | |
496 | ("libtool" ,libtool) | |
497 | ("pkg-config" ,pkg-config) | |
498 | ("which" ,which) | |
499 | ("cppunit" ,cppunit) | |
500 | ("perl" ,perl))) ; Needed for documentation. | |
501 | (arguments | |
502 | `(#:tests? #f ; The tests fail to compile due to missing headers. | |
503 | #:phases | |
504 | (modify-phases %standard-phases | |
505 | (add-after 'unpack 'change-directory | |
506 | (lambda _ | |
507 | (chdir "daemon") | |
508 | #t)) | |
509 | (add-before 'build 'add-lib-dir | |
510 | (lambda _ | |
511 | (mkdir-p "src/lib") | |
512 | #t))))) | |
513 | (synopsis "Distributed multimedia communications platform") | |
514 | (description "Jami (formerly GNU Ring) is a secure and distributed voice, | |
515 | video and chat communication platform that requires no centralized server and | |
516 | leaves the power of privacy in the hands of the user. It supports the SIP and | |
517 | IAX protocols, as well as decentralized calling using P2P-DHT. | |
518 | ||
519 | This package provides a library and daemon implementing the Jami core | |
520 | functionality.") | |
521 | (home-page "https://jami.net/") | |
522 | (license license:gpl3+))) | |
523 | ||
524 | (define-public libringclient | |
525 | (package | |
526 | (inherit libring) | |
527 | (name "libringclient") | |
528 | (build-system cmake-build-system) | |
529 | (propagated-inputs | |
530 | `(("libring" ,libring) ; For 'dring'. | |
531 | ("qtbase" ,qtbase) ; Qt is included in several installed headers. | |
532 | ("qttools" ,qttools))) | |
533 | (arguments | |
534 | `(#:tests? #f ; There is no testsuite. | |
535 | #:configure-flags | |
536 | (list (string-append "-DRING_BUILD_DIR=" | |
537 | (assoc-ref %build-inputs "libring") "/include")) | |
538 | #:phases | |
539 | (modify-phases %standard-phases | |
540 | (add-after 'unpack 'change-directory | |
541 | (lambda _ | |
542 | (chdir "lrc") | |
543 | #t)) | |
544 | (add-before 'configure 'fix-dbus-interfaces-path | |
545 | (lambda* (#:key inputs #:allow-other-keys) | |
546 | (substitute* "CMakeLists.txt" | |
547 | (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix) | |
548 | (string-append (assoc-ref inputs "libring") | |
549 | dbus-interfaces-path-suffix)))))))) | |
550 | (synopsis "Distributed multimedia communications platform") | |
551 | (description "Jami (formerly GNU Ring) is a secure and distributed voice, | |
552 | video and chat communication platform that requires no centralized server and | |
553 | leaves the power of privacy in the hands of the user. It supports the SIP and | |
554 | IAX protocols, as well as decentralized calling using P2P-DHT. | |
555 | ||
556 | This package provides a library common to all Jami clients.") | |
557 | (home-page "https://jami.net") | |
558 | (license license:gpl3+))) | |
559 | ||
560 | (define-public jami | |
561 | (package | |
562 | (inherit libring) | |
563 | (name "jami") | |
564 | (build-system cmake-build-system) | |
565 | (inputs | |
566 | `(("libringclient" ,libringclient) | |
567 | ("gtk+" ,gtk+) | |
568 | ("qrencode" ,qrencode) | |
569 | ("libnotify" ,libnotify) | |
570 | ("clutter" ,clutter) | |
571 | ("clutter-gtk" ,clutter-gtk) | |
15c6e426 JW |
572 | ("libcanberra" ,libcanberra) |
573 | ("webkitgtk" ,webkitgtk) | |
12bcfced | 574 | ("sqlite" ,sqlite))) |
15c6e426 JW |
575 | (native-inputs |
576 | `(("pkg-config" ,pkg-config) | |
f06eefa3 | 577 | ("gettext" ,gettext-minimal) |
15c6e426 JW |
578 | ("glib:bin" ,glib "bin") |
579 | ("doxygen" ,doxygen))) | |
580 | (propagated-inputs | |
581 | `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus. | |
582 | ("adwaita-icon-theme" ,adwaita-icon-theme) | |
583 | ("evolution-data-server" ,evolution-data-server))) | |
584 | (arguments | |
585 | `(#:tests? #f ; There is no testsuite. | |
586 | #:phases | |
587 | (modify-phases %standard-phases | |
588 | (add-after 'unpack 'change-directory | |
589 | (lambda _ | |
590 | (chdir "client-gnome") | |
15c6e426 JW |
591 | #t))))) |
592 | (synopsis "Distributed, privacy-respecting communication program") | |
593 | (description "Jami (formerly GNU Ring) is a secure and distributed voice, | |
594 | video and chat communication platform that requires no centralized server and | |
595 | leaves the power of privacy in the hands of the user. It supports the SIP and | |
596 | IAX protocols, as well as decentralized calling using P2P-DHT. | |
597 | ||
598 | This package provides the Jami client for the GNOME desktop.") | |
599 | (home-page "https://jami.net") | |
600 | (license license:gpl3+))) |