services: web: Do not export record type descriptors.
[jackhill/guix/guix.git] / gnu / packages / gnunet.scm
CommitLineData
eb4b2ab6 1;;; GNU Guix --- Functional package management for GNU
8ca73fce 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
05e8a0b0 3;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
9c8893ce 4;;; Copyright © 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
cf7ca6fe 5;;; Copyright © 2015, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
3ccdd430 6;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
fd7fd3c1 7;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
a3a8b886 8;;; Copyright © 2016, 2017, 2018, 2019, 2020 Nikita <nikita@n0.is>
2392e589 9;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
1983a9b0 10;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
94cc994e 11;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
aaa7d17d 12;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
eb4b2ab6
AE
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)
266b39fc 30 #:use-module (gnu packages)
2fd22ec5 31 #:use-module (gnu packages file)
3ccdd430 32 #:use-module (gnu packages aidc)
eb4b2ab6
AE
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages compression)
88065ec2 35 #:use-module (gnu packages curl)
1dba6407 36 #:use-module (gnu packages gettext)
eb4b2ab6 37 #:use-module (gnu packages glib)
3ccdd430 38 #:use-module (gnu packages gnome)
88065ec2 39 #:use-module (gnu packages gnupg)
a85cb486 40 #:use-module (gnu packages groff)
3ccdd430 41 #:use-module (gnu packages gtk)
59698c2c 42 #:use-module (gnu packages guile)
248c0645 43 #:use-module (gnu packages gstreamer)
a85cb486 44 #:use-module (gnu packages libidn)
6adda006 45 #:use-module (gnu packages linux)
e55354b8 46 #:use-module (gnu packages image)
266b39fc
SHT
47 #:use-module (gnu packages libunistring)
48 #:use-module (gnu packages maths)
6adda006 49 #:use-module (gnu packages multiprecision)
b0a2addd 50 #:use-module (gnu packages music)
6adda006 51 #:use-module (gnu packages ncurses)
aff0cce9 52 #:use-module (gnu packages nss)
b0a2addd 53 #:use-module (gnu packages package-management)
eb4b2ab6 54 #:use-module (gnu packages pkg-config)
a85cb486 55 #:use-module (gnu packages perl)
266b39fc 56 #:use-module (gnu packages pulseaudio)
a85cb486 57 #:use-module (gnu packages python)
cd0322a3 58 #:use-module (gnu packages sqlite)
a7fd7b68 59 #:use-module (gnu packages tls)
edce1993 60 #:use-module (gnu packages upnp)
248c0645 61 #:use-module (gnu packages video)
edce1993 62 #:use-module (gnu packages vim)
6adda006 63 #:use-module (gnu packages web)
54ff0b7d 64 #:use-module (gnu packages xiph)
cd372ca3 65 #:use-module (gnu packages backup)
b5b73a82 66 #:use-module ((guix licenses) #:prefix license:)
eb4b2ab6
AE
67 #:use-module (guix packages)
68 #:use-module (guix download)
59698c2c 69 #:use-module (guix git-download)
eb4b2ab6
AE
70 #:use-module (guix build-system gnu))
71
72(define-public libextractor
73 (package
74 (name "libextractor")
a3f2c295 75 (version "1.9")
eb4b2ab6
AE
76 (source (origin
77 (method url-fetch)
78 (uri (string-append "mirror://gnu/libextractor/libextractor-"
79 version ".tar.gz"))
80 (sha256
81 (base32
2cb81e1e
LC
82 "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh"))
83 (patches (search-patches "libextractor-exiv2.patch"))))
eb4b2ab6
AE
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:
eb4b2ab6 90 ;; * libmagic (file)
b0a2addd 91 ;; * librpm (rpm) ; investigate failure
cd372ca3 92 ;; * libgif (giflib) ; investigate failure
eb4b2ab6 93 (inputs
2e838890 94 `(("exiv2" ,exiv2)
b0a2addd 95 ("bzip2" ,bzip2)
eb4b2ab6 96 ("flac" ,flac)
c44ba525 97 ("ffmpeg" ,ffmpeg)
2fd22ec5 98 ("file" ,file) ;libmagic, for the MIME plug-in
eb4b2ab6 99 ("glib" ,glib)
248c0645
AE
100 ("gstreamer" ,gstreamer)
101 ("gst-plugins-base" ,gst-plugins-base)
cd372ca3 102 ("gtk+" ,gtk+)
103 ("libarchive" ,libarchive)
104 ("libgsf" ,libgsf)
4bd428a7 105 ("libjpeg" ,libjpeg-turbo)
cd372ca3 106 ("libltdl" ,libltdl)
107 ("libmpeg2" ,libmpeg2)
b0a2addd 108 ("libmp4v2" ,libmp4v2)
109 ("libsmf" ,libsmf)
110 ("tidy-html" ,tidy-html)
eb4b2ab6
AE
111 ("libogg" ,libogg)
112 ("libtiff" ,libtiff)
eb4b2ab6 113 ("libvorbis" ,libvorbis)
eb4b2ab6 114 ("zlib" ,zlib)))
c4c4cc05 115 (native-inputs
cd372ca3 116 `(("pkg-config" ,pkg-config)))
ff711960 117 (outputs '("out"
118 "static")) ; 396 KiB .a files
cd372ca3 119 (arguments
120 `(#:configure-flags
121 (list (string-append "--with-ltdl="
b0a2addd 122 (assoc-ref %build-inputs "libltdl"))
123 (string-append "--with-tidy="
124 (assoc-ref %build-inputs "tidy-html")))
ff711960 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))))))
eb4b2ab6
AE
141 (synopsis "Library to extract meta-data from media files")
142 (description
79c311b8 143 "GNU libextractor is a library for extracting metadata from files. It
a22dc0c4
LC
144supports a very large number of file formats, including audio files, document
145files, and archive files. Each file format is implemented as a plugin, so
79c311b8 146new formats can be added easily. The package also contains a command-line
a22dc0c4 147tool to extract metadata from a file and print the results.")
eb4b2ab6 148 (license license:gpl3+)
6fd52309 149 (home-page "https://www.gnu.org/software/libextractor/")))
88065ec2
AE
150
151(define-public libmicrohttpd
152 (package
153 (name "libmicrohttpd")
31e390f6 154 (version "0.9.70")
88065ec2
AE
155 (source (origin
156 (method url-fetch)
157 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
158 version ".tar.gz"))
159 (sha256
160 (base32
31e390f6 161 "01vkjy89b1ylmh22dy5yza2r414nfwcfixxh3v29nvzrjv9s7l4h"))))
88065ec2
AE
162 (build-system gnu-build-system)
163 (inputs
164 `(("curl" ,curl)
1472f630 165 ("gnutls" ,gnutls/dane)
88065ec2
AE
166 ("libgcrypt" ,libgcrypt)
167 ("openssl" ,openssl)
168 ("zlib" ,zlib)))
169 (synopsis "C library implementing an HTTP 1.1 server")
170 (description
dce17227
AE
171 "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a
172C library. It makes it easy to run an HTTP server as part of another
a22dc0c4 173application. The library is fully HTTP 1.1 compliant. It can listen on
dce17227 174multiple ports, supports four different threading models, and supports
ff6dcc1a
EF
175IPv6. It also features security features such as basic and digest
176authentication and support for SSL3 and TLS.")
88065ec2 177 (license license:lgpl2.1+)
b02b9a52 178 (home-page "https://www.gnu.org/software/libmicrohttpd/")))
a85cb486
SHT
179
180(define-public gnurl
181 (package
182 (name "gnurl")
a3a8b886 183 (version "7.70.0")
a85cb486
SHT
184 (source (origin
185 (method url-fetch)
55d45264 186 (uri (string-append "mirror://gnu/gnunet/gnurl-" version ".tar.gz"))
a85cb486 187 (sha256
7012e2c7 188 (base32
a3a8b886 189 "0px9la8v4bj1dzxb95fx3yxk0rcjqjrxpj733ga27cza45wwzkqa"))))
a85cb486 190 (build-system gnu-build-system)
50e9f81a 191 (outputs '("out"
cf7ca6fe 192 "doc")) ; 1.8 MiB of man3 pages
fd67e3a2 193 (inputs `(("gnutls" ,gnutls/dane)
cf7ca6fe 194 ("libidn2" ,libidn2)
a85cb486
SHT
195 ("zlib" ,zlib)))
196 (native-inputs
a35e0033 197 `(("libtool" ,libtool)
7af52bd5
SHT
198 ("perl" ,perl)
199 ("pkg-config" ,pkg-config)
cf7ca6fe 200 ("python" ,python)))
a85cb486 201 (arguments
cf7ca6fe
EF
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")
c543b4e1 220 #:phases
b9fe72bf 221 (modify-phases %standard-phases
50e9f81a 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)))
cf7ca6fe 231 ;; We have to patch runtests.pl in tests/ directory
4ec08b63 232 (replace 'check
a0e43c9f 233 (lambda _
b9fe72bf
EF
234 (substitute* "tests/runtests.pl"
235 (("/bin/sh") (which "sh")))
4ec08b63 236
237 ;; Make test output more verbose.
0741c3a4 238 (invoke "make" "-C" "tests" "test"))))))
a85cb486
SHT
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
35b9e423 242with URL syntax. While cURL supports many crypto backends, libgnurl only
5f9d5905 243supports HTTP, HTTPS and GnuTLS.")
166191b3
LC
244 (license (license:non-copyleft "file://COPYING"
245 "See COPYING in the distribution."))
5f2122fb
EF
246 (properties '((ftp-server . "ftp.gnu.org")
247 (ftp-directory . "/gnunet")))
9c8893ce 248 (home-page "https://gnunet.org/en/gnurl.html")))
266b39fc
SHT
249
250(define-public gnunet
251 (package
252 (name "gnunet")
aaa7d17d 253 (version "0.12.2")
266b39fc
SHT
254 (source
255 (origin
256 (method url-fetch)
257 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
258 ".tar.gz"))
6adda006 259 (sha256
260 (base32
aaa7d17d 261 "1mwcy7fj1rpd39w7j7k3jdwlil5s889b2qlhfdggqmhigl28na5c"))))
266b39fc
SHT
262 (build-system gnu-build-system)
263 (inputs
edce1993
EF
264 `(("bluez" ,bluez)
265 ("glpk" ,glpk)
05e8a0b0 266 ("gnurl" ,gnurl)
6a5f7af6 267 ("gnutls" ,gnutls/dane)
edce1993
EF
268 ("gstreamer" ,gstreamer)
269 ("jansson" ,jansson)
266b39fc 270 ("libextractor" ,libextractor)
edce1993 271 ("libidn" ,libidn2)
266b39fc 272 ("libgcrypt" ,libgcrypt)
c4d769d3 273 ("libjpeg" ,libjpeg-turbo)
3246cc91 274 ("libltdl" ,libltdl)
edce1993
EF
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)))
266b39fc 284 (native-inputs
edce1993
EF
285 `(("pkg-config" ,pkg-config)
286 ("python" ,python)
287 ("xxd" ,xxd)
288 ("which" ,(@ (gnu packages base) which))))
266b39fc 289 (arguments
edce1993 290 '(#:parallel-tests? #f ; Parallel tests aren't supported.
f944fbf1 291 #:phases
90d8ef6b 292 (modify-phases %standard-phases
edce1993 293 (add-after 'configure 'remove-failing-tests
aaa7d17d 294 ;; These tests fail in Guix's building environment.
edce1993 295 (lambda _
aaa7d17d
TLC
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\\)") ""))
edce1993 307 (substitute* "src/transport/Makefile"
aaa7d17d
TLC
308 (("\\$\\(am__EXEEXT_15\\)") "") ; test_transport_api_https
309 (("test_transport_api_manipulation_cfg\\$\\(EXEEXT\\) \\\\\n") "")
edce1993 310 (("test_transport_api_udp_nat\\$\\(EXEEXT\\) \\\\\n") "")
aaa7d17d
TLC
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") ""))
edce1993
EF
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))
aaa7d17d
TLC
332 (add-before 'check 'set-env-var-for-tests
333 (lambda _
334 (setenv "LANG" "en_US.UTF-8")))
edce1993 335 ;; Swap 'check and 'install phases and add installed binaries to $PATH.
90d8ef6b
EF
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))
edce1993 342 (delete 'check)
90d8ef6b 343 (add-after 'install 'check
edce1993 344 (assoc-ref %standard-phases 'check)))))
574e86f9 345 (synopsis "Secure, decentralized, peer-to-peer networking framework")
266b39fc 346 (description
a3947cb1
LC
347 "GNUnet is a framework for secure peer-to-peer networking. The
348high-level goal is to provide a strong foundation of free software for a
349global, distributed network that provides security and privacy. GNUnet in
350that sense aims to replace the current internet protocol stack. Along with
351an application for secure publication of files, it has grown to include all
352kinds of basic applications for the foundation of a GNU internet.")
94cc994e 353 (license license:agpl3+)
266b39fc 354 (home-page "https://gnunet.org/")))
59698c2c
LC
355
356(define-public guile-gnunet ;GSoC 2015!
5651e74c
AV
357 (let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")
358 (revision "1"))
59698c2c
LC
359 (package
360 (name "guile-gnunet")
5651e74c 361 (version (git-version "0.0" revision commit))
59698c2c
LC
362 (source (origin
363 (method git-fetch)
364 (uri (git-reference
5f13bf09 365 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
59698c2c 366 (commit commit)))
5651e74c 367 (file-name (git-file-name name version))
59698c2c
LC
368 (sha256
369 (base32
5651e74c 370 "0nqc18jh9j30y4l6yh6j35byfg6qalq7yr3frv9rk10qa041c2sv"))))
59698c2c 371 (build-system gnu-build-system)
59698c2c 372 (native-inputs `(("pkg-config" ,pkg-config)
464f5447 373 ("autoconf" ,autoconf-wrapper)
59698c2c
LC
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
380GNUnet services, including the @dfn{identity} and @dfn{file sharing}
381services.")
cc04b099 382 (home-page "https://gnu.org/software/guix")
59698c2c 383 (license license:gpl3+))))
3ccdd430 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")
370cb2e0 391 (version "0.12.0")
3ccdd430 392 (source (origin
393 (method url-fetch)
394 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
395 version ".tar.gz"))
396 (sha256
397 (base32
370cb2e0 398 "08a43ayv1rhajdklfcv78w2h76jfaz64kgp5krqgj1w1sq8xm6fb"))))
3ccdd430 399 (arguments
400 `(#:configure-flags
d8bc4729 401 (list "--with-libunique"
9b12bc70 402 "--with-qrencode"
403 (string-append "--with-gnunet="
404 (assoc-ref %build-inputs "gnunet")))))
3ccdd430 405 (inputs
2f6500fa
EF
406 `(("glade3" ,glade3)
407 ("gnunet" ,gnunet)
dbdd7707 408 ("gnutls" ,gnutls/dane)
3ccdd430 409 ("gtk+" ,gtk+)
410 ("libextractor" ,libextractor)
2f6500fa
EF
411 ("libgcrypt" ,libgcrypt)
412 ("libunique" ,libunique)
413 ("qrencode" ,qrencode)))
3ccdd430 414 (native-inputs
415 `(("pkg-config" ,pkg-config)
416 ("libglade" ,libglade)))
baac9ff9
EF
417 (synopsis "Graphical front-end tools for GNUnet")
418 (properties '((ftp-server . "ftp.gnu.org")
419 (ftp-directory . "/gnunet")))))