mailmap: Update entries for Nikita.
[jackhill/guix/guix.git] / gnu / packages / gnunet.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
4 ;;; Copyright © 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2016, 2017, 2018, 2019 Nikita <nikita@n0.is>
9 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
11 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
12 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages gnunet)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages file)
32 #:use-module (gnu packages aidc)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages curl)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gnome)
39 #:use-module (gnu packages gnupg)
40 #:use-module (gnu packages groff)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages guile)
43 #:use-module (gnu packages gstreamer)
44 #:use-module (gnu packages libidn)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages image)
47 #:use-module (gnu packages libunistring)
48 #:use-module (gnu packages maths)
49 #:use-module (gnu packages multiprecision)
50 #:use-module (gnu packages music)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages nss)
53 #:use-module (gnu packages package-management)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages pulseaudio)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages sqlite)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages upnp)
61 #:use-module (gnu packages video)
62 #:use-module (gnu packages vim)
63 #:use-module (gnu packages web)
64 #:use-module (gnu packages xiph)
65 #:use-module (gnu packages backup)
66 #:use-module ((guix licenses) #:prefix license:)
67 #:use-module (guix packages)
68 #:use-module (guix download)
69 #:use-module (guix git-download)
70 #:use-module (guix build-system gnu))
71
72 (define-public libextractor
73 (package
74 (name "libextractor")
75 (version "1.9")
76 (source (origin
77 (method url-fetch)
78 (uri (string-append "mirror://gnu/libextractor/libextractor-"
79 version ".tar.gz"))
80 (sha256
81 (base32
82 "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh"))
83 (patches (search-patches "libextractor-exiv2.patch"))))
84 (build-system gnu-build-system)
85 ;; WARNING: Checks require /dev/shm to be in the build chroot, especially
86 ;; not to be a symbolic link to /run/shm.
87 ;; FIXME:
88 ;; The following dependencies are all optional, but should be
89 ;; available for maximum coverage:
90 ;; * libmagic (file)
91 ;; * librpm (rpm) ; investigate failure
92 ;; * libgif (giflib) ; investigate failure
93 (inputs
94 `(("exiv2" ,exiv2)
95 ("bzip2" ,bzip2)
96 ("flac" ,flac)
97 ("ffmpeg" ,ffmpeg)
98 ("file" ,file) ;libmagic, for the MIME plug-in
99 ("glib" ,glib)
100 ("gstreamer" ,gstreamer)
101 ("gst-plugins-base" ,gst-plugins-base)
102 ("gtk+" ,gtk+)
103 ("libarchive" ,libarchive)
104 ("libgsf" ,libgsf)
105 ("libjpeg" ,libjpeg-turbo)
106 ("libltdl" ,libltdl)
107 ("libmpeg2" ,libmpeg2)
108 ("libmp4v2" ,libmp4v2)
109 ("libsmf" ,libsmf)
110 ("tidy-html" ,tidy-html)
111 ("libogg" ,libogg)
112 ("libtiff" ,libtiff)
113 ("libvorbis" ,libvorbis)
114 ("zlib" ,zlib)))
115 (native-inputs
116 `(("pkg-config" ,pkg-config)))
117 (outputs '("out"
118 "static")) ; 396 KiB .a files
119 (arguments
120 `(#:configure-flags
121 (list (string-append "--with-ltdl="
122 (assoc-ref %build-inputs "libltdl"))
123 (string-append "--with-tidy="
124 (assoc-ref %build-inputs "tidy-html")))
125 #:parallel-tests? #f
126 #:phases
127 (modify-phases %standard-phases
128 (add-after 'install 'move-static-libraries
129 (lambda* (#:key outputs #:allow-other-keys)
130 ;; Move static libraries to the "static" output.
131 (let* ((out (assoc-ref outputs "out"))
132 (lib (string-append out "/lib"))
133 (static (assoc-ref outputs "static"))
134 (slib (string-append static "/lib")))
135 (mkdir-p slib)
136 (for-each (lambda (file)
137 (install-file file slib)
138 (delete-file file))
139 (find-files lib "\\.a$"))
140 #t))))))
141 (synopsis "Library to extract meta-data from media files")
142 (description
143 "GNU libextractor is a library for extracting metadata from files. It
144 supports a very large number of file formats, including audio files, document
145 files, and archive files. Each file format is implemented as a plugin, so
146 new formats can be added easily. The package also contains a command-line
147 tool to extract metadata from a file and print the results.")
148 (license license:gpl3+)
149 (home-page "https://www.gnu.org/software/libextractor/")))
150
151 (define-public libmicrohttpd
152 (package
153 (name "libmicrohttpd")
154 (version "0.9.70")
155 (source (origin
156 (method url-fetch)
157 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
158 version ".tar.gz"))
159 (sha256
160 (base32
161 "01vkjy89b1ylmh22dy5yza2r414nfwcfixxh3v29nvzrjv9s7l4h"))))
162 (build-system gnu-build-system)
163 (inputs
164 `(("curl" ,curl)
165 ("gnutls" ,gnutls/dane)
166 ("libgcrypt" ,libgcrypt)
167 ("openssl" ,openssl)
168 ("zlib" ,zlib)))
169 (synopsis "C library implementing an HTTP 1.1 server")
170 (description
171 "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a
172 C library. It makes it easy to run an HTTP server as part of another
173 application. The library is fully HTTP 1.1 compliant. It can listen on
174 multiple ports, supports four different threading models, and supports
175 IPv6. It also features security features such as basic and digest
176 authentication and support for SSL3 and TLS.")
177 (license license:lgpl2.1+)
178 (home-page "https://www.gnu.org/software/libmicrohttpd/")))
179
180 (define-public gnurl
181 (package
182 (name "gnurl")
183 (version "7.69.1")
184 (source (origin
185 (method url-fetch)
186 (uri (string-append "mirror://gnu/gnunet/gnurl-" version ".tar.gz"))
187 (sha256
188 (base32
189 "0x8m26y3klndis6a28j8i0b7ab04d38q3rmlvgaqa65bjhlfdrp0"))))
190 (build-system gnu-build-system)
191 (outputs '("out"
192 "doc")) ; 1.8 MiB of man3 pages
193 (inputs `(("gnutls" ,gnutls/dane)
194 ("libidn2" ,libidn2)
195 ("zlib" ,zlib)))
196 (native-inputs
197 `(("libtool" ,libtool)
198 ("perl" ,perl)
199 ("pkg-config" ,pkg-config)
200 ("python" ,python)))
201 (arguments
202 `(#:configure-flags
203 ;; All of these produce errors during configure.
204 (list "--disable-ftp"
205 "--disable-file"
206 "--disable-ldap"
207 "--disable-rtsp"
208 "--disable-dict"
209 "--disable-telnet"
210 "--disable-tftp"
211 "--disable-pop3"
212 "--disable-imap"
213 "--disable-smb"
214 "--disable-smtp"
215 "--disable-gopher"
216 "--without-ssl"
217 "--without-libpsl"
218 "--without-librtmp"
219 "--disable-ntlm-wb")
220 #:phases
221 (modify-phases %standard-phases
222 (add-after 'install 'move-man3-pages
223 (lambda* (#:key outputs #:allow-other-keys)
224 ;; Move section 3 man pages to "doc".
225 (let ((out (assoc-ref outputs "out"))
226 (doc (assoc-ref outputs "doc")))
227 (mkdir-p (string-append doc "/share/man"))
228 (rename-file (string-append out "/share/man/man3")
229 (string-append doc "/share/man/man3"))
230 #t)))
231 ;; We have to patch runtests.pl in tests/ directory
232 (replace 'check
233 (lambda _
234 (substitute* "tests/runtests.pl"
235 (("/bin/sh") (which "sh")))
236
237 ;; Make test output more verbose.
238 (invoke "make" "-C" "tests" "test"))))))
239 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
240 (description
241 "Gnurl is a microfork of cURL, a command line tool for transferring data
242 with URL syntax. While cURL supports many crypto backends, libgnurl only
243 supports HTTP, HTTPS and GnuTLS.")
244 (license (license:non-copyleft "file://COPYING"
245 "See COPYING in the distribution."))
246 (properties '((ftp-server . "ftp.gnu.org")
247 (ftp-directory . "/gnunet")))
248 (home-page "https://gnunet.org/gnurl")))
249
250 (define-public gnunet
251 (package
252 (name "gnunet")
253 (version "0.12.2")
254 (source
255 (origin
256 (method url-fetch)
257 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
258 ".tar.gz"))
259 (sha256
260 (base32
261 "1mwcy7fj1rpd39w7j7k3jdwlil5s889b2qlhfdggqmhigl28na5c"))))
262 (build-system gnu-build-system)
263 (inputs
264 `(("bluez" ,bluez)
265 ("glpk" ,glpk)
266 ("gnurl" ,gnurl)
267 ("gnutls" ,gnutls/dane)
268 ("gstreamer" ,gstreamer)
269 ("jansson" ,jansson)
270 ("libextractor" ,libextractor)
271 ("libidn" ,libidn2)
272 ("libgcrypt" ,libgcrypt)
273 ("libjpeg" ,libjpeg-turbo)
274 ("libltdl" ,libltdl)
275 ("libmicrohttpd" ,libmicrohttpd)
276 ("libogg" ,libogg)
277 ("libunistring" ,libunistring)
278 ("miniupnpc" ,miniupnpc)
279 ("opus" ,opus)
280 ("pulseaudio" ,pulseaudio)
281 ("sqlite" ,sqlite)
282 ("zbar" ,zbar)
283 ("zlib" ,zlib)))
284 (native-inputs
285 `(("pkg-config" ,pkg-config)
286 ("python" ,python)
287 ("xxd" ,xxd)
288 ("which" ,(@ (gnu packages base) which))))
289 (arguments
290 '(#:parallel-tests? #f ; Parallel tests aren't supported.
291 #:phases
292 (modify-phases %standard-phases
293 (add-after 'configure 'remove-failing-tests
294 ;; These tests fail in Guix's building environment.
295 (lambda _
296 (substitute* "src/cadet/Makefile"
297 (("test_cadet_2_reopen\\$\\(EXEEXT\\) \\\\\n") "test_cadet_2_reopen$(EXEEXT)")
298 (("test_cadet_5_forward\\$\\(EXEEXT\\) \\\\\n") "")
299 (("test_cadet_5_signal\\$\\(EXEEXT\\) \\\\\n") "")
300 (("test_cadet_5_keepalive\\$\\(EXEEXT\\) \\\\\n") "")
301 (("test_cadet_5_speed\\$\\(EXEEXT\\) \\\\\n") "")
302 (("test_cadet_5_speed_ack\\$\\(EXEEXT\\) \\\\\n") "")
303 (("test_cadet_5_speed_reliable\\$\\(EXEEXT\\) \\\\\n") "")
304 (("test_cadet_5_speed_reliable_backwards\\$\\(EXEEXT\\) \\\\\n") "")
305 (("test_cadet_5_speed_backwards\\$\\(EXEEXT\\) \\\\\n") "")
306 (("test_cadet_5_reopen\\$\\(EXEEXT\\)") ""))
307 (substitute* "src/transport/Makefile"
308 (("\\$\\(am__EXEEXT_15\\)") "") ; test_transport_api_https
309 (("test_transport_api_manipulation_cfg\\$\\(EXEEXT\\) \\\\\n") "")
310 (("test_transport_api_udp_nat\\$\\(EXEEXT\\) \\\\\n") "")
311 (("test_transport_blacklisting_multiple_plugins\\$\\(EXEEXT\\) \\\\\n") ""))
312 (substitute* "src/testbed/Makefile"
313 (("test_testbed_api_2peers_1controller\\$\\(EXEEXT\\) \\\\\n") "")
314 (("test_testbed_api_test\\$\\(EXEEXT\\) \\\\\n") "")
315 (("test_testbed_api_statistics\\$\\(EXEEXT\\) \\\\\n") "")
316 (("test_testbed_api_topology\\$\\(EXEEXT\\) \\\\\n") "")
317 (("test_testbed_api_topology_clique\\$\\(EXEEXT\\) \\\\\n") ""))
318 (substitute* "src/topology/Makefile"
319 (("^check_PROGRAMS.*") "\n")
320 (("test_gnunet_daemon_topology\\$\\(EXEEXT\\)\n") ""))
321 (substitute* "src/namestore/Makefile"
322 (("\\$\\(am__append_2\\)") ""))
323 (substitute* "src/gns/Makefile"
324 (("\\$\\(am__append_4\\)") ""))
325 (substitute* "contrib/Makefile"
326 (("^check_PROGRAMS.*") "\n"))
327 ;; 'test' from coreutils doesn't behave as the test expects.
328 (substitute* '("src/gns/gnunet-gns-proxy-setup-ca.in"
329 "src/transport/gnunet-transport-certificate-creation.in")
330 (("gnutls-certtool") "certtool"))
331 #t))
332 (add-before 'check 'set-env-var-for-tests
333 (lambda _
334 (setenv "LANG" "en_US.UTF-8")))
335 ;; Swap 'check and 'install phases and add installed binaries to $PATH.
336 (add-before 'check 'set-path-for-check
337 (lambda* (#:key outputs #:allow-other-keys)
338 (let ((out (assoc-ref outputs "out")))
339 (setenv "GNUNET_PREFIX" (string-append out "/lib"))
340 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")))
341 #t))
342 (delete 'check)
343 (add-after 'install 'check
344 (assoc-ref %standard-phases 'check)))))
345 (synopsis "Secure, decentralized, peer-to-peer networking framework")
346 (description
347 "GNUnet is a framework for secure peer-to-peer networking. The
348 high-level goal is to provide a strong foundation of free software for a
349 global, distributed network that provides security and privacy. GNUnet in
350 that sense aims to replace the current internet protocol stack. Along with
351 an application for secure publication of files, it has grown to include all
352 kinds of basic applications for the foundation of a GNU internet.")
353 (license license:agpl3+)
354 (home-page "https://gnunet.org/")))
355
356 (define-public guile-gnunet ;GSoC 2015!
357 (let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")
358 (revision "1"))
359 (package
360 (name "guile-gnunet")
361 (version (git-version "0.0" revision commit))
362 (source (origin
363 (method git-fetch)
364 (uri (git-reference
365 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
366 (commit commit)))
367 (file-name (git-file-name name version))
368 (sha256
369 (base32
370 "0nqc18jh9j30y4l6yh6j35byfg6qalq7yr3frv9rk10qa041c2sv"))))
371 (build-system gnu-build-system)
372 (native-inputs `(("pkg-config" ,pkg-config)
373 ("autoconf" ,autoconf-wrapper)
374 ("automake" ,automake)))
375 (inputs `(("guile" ,guile-2.0)
376 ("gnunet" ,gnunet)))
377 (synopsis "Guile bindings for GNUnet services")
378 (description
379 "This package provides Guile bindings to the client libraries of various
380 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
381 services.")
382 (home-page "https://gnu.org/software/guix")
383 (license license:gpl3+))))
384
385 ;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
386 ;; does not seem to be fully functional. This has been reported upstream:
387 ;; http://lists.gnu.org/archive/html/gnunet-developers/2016-02/msg00004.html
388 (define-public gnunet-gtk
389 (package (inherit gnunet)
390 (name "gnunet-gtk")
391 (version "0.12.0")
392 (source (origin
393 (method url-fetch)
394 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
395 version ".tar.gz"))
396 (sha256
397 (base32
398 "08a43ayv1rhajdklfcv78w2h76jfaz64kgp5krqgj1w1sq8xm6fb"))))
399 (arguments
400 `(#:configure-flags
401 (list "--with-libunique"
402 "--with-qrencode"
403 (string-append "--with-gnunet="
404 (assoc-ref %build-inputs "gnunet")))))
405 (inputs
406 `(("glade3" ,glade3)
407 ("gnunet" ,gnunet)
408 ("gnutls" ,gnutls/dane)
409 ("gtk+" ,gtk+)
410 ("libextractor" ,libextractor)
411 ("libgcrypt" ,libgcrypt)
412 ("libunique" ,libunique)
413 ("qrencode" ,qrencode)))
414 (native-inputs
415 `(("pkg-config" ,pkg-config)
416 ("libglade" ,libglade)))
417 (synopsis "Graphical front-end tools for GNUnet")
418 (properties '((ftp-server . "ftp.gnu.org")
419 (ftp-directory . "/gnunet")))))