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>
14 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
72 (define-public libextractor
78 (uri (string-append "mirror://gnu/libextractor/libextractor-"
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.
88 ;; The following dependencies are all optional, but should be
89 ;; available for maximum coverage:
91 ;; * librpm (rpm) ; investigate failure
92 ;; * libgif (giflib) ; investigate failure
98 ("file" ,file) ;libmagic, for the MIME plug-in
100 ("gstreamer" ,gstreamer)
101 ("gst-plugins-base" ,gst-plugins-base)
103 ("libarchive" ,libarchive)
105 ("libjpeg" ,libjpeg-turbo)
107 ("libmpeg2" ,libmpeg2)
108 ("libmp4v2" ,libmp4v2)
110 ("tidy-html" ,tidy-html)
113 ("libvorbis" ,libvorbis)
116 `(("pkg-config" ,pkg-config)))
118 "static")) ; 396 KiB .a files
121 (list (string-append "--with-ltdl="
122 (assoc-ref %build-inputs "libltdl"))
123 (string-append "--with-tidy="
124 (assoc-ref %build-inputs "tidy-html")))
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")))
136 (for-each (lambda (file)
137 (install-file file slib)
139 (find-files lib "\\.a$"))
141 (synopsis "Library to extract meta-data from media files")
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/")))
151 (define-public libmicrohttpd
153 (name "libmicrohttpd")
157 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
161 "01vkjy89b1ylmh22dy5yza2r414nfwcfixxh3v29nvzrjv9s7l4h"))))
162 (build-system gnu-build-system)
165 ("gnutls" ,gnutls/dane)
166 ("libgcrypt" ,libgcrypt)
169 (synopsis "C library implementing an HTTP 1.1 server")
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/")))
186 (uri (string-append "mirror://gnu/gnunet/gnurl-" version ".tar.gz"))
189 "0x8m26y3klndis6a28j8i0b7ab04d38q3rmlvgaqa65bjhlfdrp0"))))
190 (build-system gnu-build-system)
192 "doc")) ; 1.8 MiB of man3 pages
193 (inputs `(("gnutls" ,gnutls/dane)
197 `(("libtool" ,libtool)
199 ("pkg-config" ,pkg-config)
203 ;; All of these produce errors during configure.
204 (list "--disable-ftp"
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"))
231 ;; We have to patch runtests.pl in tests/ directory
234 (substitute* "tests/runtests.pl"
235 (("/bin/sh") (which "sh")))
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")
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")))
250 (define-public gnunet
257 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
261 "1mwcy7fj1rpd39w7j7k3jdwlil5s889b2qlhfdggqmhigl28na5c"))))
262 (build-system gnu-build-system)
267 ("gnutls" ,gnutls/dane)
268 ("gstreamer" ,gstreamer)
270 ("libextractor" ,libextractor)
272 ("libgcrypt" ,libgcrypt)
273 ("libjpeg" ,libjpeg-turbo)
275 ("libmicrohttpd" ,libmicrohttpd)
277 ("libunistring" ,libunistring)
278 ("miniupnpc" ,miniupnpc)
280 ("pulseaudio" ,pulseaudio)
285 `(("pkg-config" ,pkg-config)
288 ("which" ,(@ (gnu packages base) which))))
290 '(#:parallel-tests? #f ; Parallel tests aren't supported.
292 (modify-phases %standard-phases
293 (add-after 'configure 'remove-failing-tests
294 ;; These tests fail in Guix's building environment.
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"))
332 (add-before 'check 'set-env-var-for-tests
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")))
343 (add-after 'install 'check
344 (assoc-ref %standard-phases 'check)))))
345 (synopsis "Secure, decentralized, peer-to-peer networking framework")
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/")))
356 (define-public guile-gnunet ;GSoC 2015!
357 (let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")
360 (name "guile-gnunet")
361 (version (git-version "0.0" revision commit))
365 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
367 (file-name (git-file-name name version))
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)
377 (synopsis "Guile bindings for GNUnet services")
379 "This package provides Guile bindings to the client libraries of various
380 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
382 (home-page "https://gnu.org/software/guix")
383 (license license:gpl3+))))
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)
394 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
398 "08a43ayv1rhajdklfcv78w2h76jfaz64kgp5krqgj1w1sq8xm6fb"))))
401 (list "--with-libunique"
403 (string-append "--with-gnunet="
404 (assoc-ref %build-inputs "gnunet")))))
408 ("gnutls" ,gnutls/dane)
410 ("libextractor" ,libextractor)
411 ("libgcrypt" ,libgcrypt)
412 ("libunique" ,libunique)
413 ("qrencode" ,qrencode)))
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")))))