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