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>
15 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
74 (define-public libextractor
80 (uri (string-append "mirror://gnu/libextractor/libextractor-"
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.
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
98 ("file" ,file) ;libmagic, for the MIME plug-in
101 ("gstreamer" ,gstreamer)
102 ("gst-plugins-base" ,gst-plugins-base)
104 ("libarchive" ,libarchive)
106 ("libjpeg" ,libjpeg-turbo)
108 ("libmpeg2" ,libmpeg2)
109 ("libmp4v2" ,libmp4v2)
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")))
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
130 (substitute* "src/plugins/test_exiv2.c"
131 (("17.585\\\\\" ") "18\\\"")
132 (("21.713\\\\\" ") "22\\\""))
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")))
142 (for-each (lambda (file)
143 (install-file file slib)
145 (find-files lib "\\.a$"))
147 (synopsis "Library to extract meta-data from media files")
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/")))
157 (define-public libmicrohttpd
159 (name "libmicrohttpd")
163 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
167 "10mii4mifmfs3v7kgciqml7f0fj7ljp0sngrx64pnwmgbzl4bx78"))))
168 (build-system gnu-build-system)
171 ("gnutls" ,gnutls/dane)
172 ("libgcrypt" ,libgcrypt)
175 (synopsis "C library implementing an HTTP 1.1 server")
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/")))
192 (uri (string-append "mirror://gnu/gnunet/gnurl-" version ".tar.gz"))
195 "0px9la8v4bj1dzxb95fx3yxk0rcjqjrxpj733ga27cza45wwzkqa"))))
196 (build-system gnu-build-system)
198 "doc")) ; 1.8 MiB of man3 pages
199 (inputs `(("gnutls" ,gnutls/dane)
203 `(("libtool" ,libtool)
205 ("pkg-config" ,pkg-config)
209 ;; All of these produce errors during configure.
210 (list "--disable-ftp"
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"))
237 ;; We have to patch runtests.pl in tests/ directory
240 (substitute* "tests/runtests.pl"
241 (("/bin/sh") (which "sh")))
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")
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")))
256 (define-public gnunet
263 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
267 "15jnca5zxng7r6m3qzq9lr73xxq0v6mvcp0lny3zrlkz5s2nmmq3"))))
268 (build-system gnu-build-system)
273 ("gnutls" ,gnutls/dane)
274 ("gstreamer" ,gstreamer)
276 ("libextractor" ,libextractor)
278 ("libgcrypt" ,libgcrypt)
279 ("libjpeg" ,libjpeg-turbo)
281 ("libmicrohttpd" ,libmicrohttpd)
283 ("libsodium" ,libsodium)
284 ("libunistring" ,libunistring)
285 ("miniupnpc" ,miniupnpc)
287 ("pulseaudio" ,pulseaudio)
293 ("pkg-config" ,pkg-config)
296 ("which" ,(@ (gnu packages base) which))))
298 '(#:parallel-tests? #f ; Parallel tests aren't supported.
300 (modify-phases %standard-phases
301 (add-after 'configure 'remove-failing-tests
302 ;; These tests fail in Guix's building environment.
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"))
330 (add-before 'check 'set-env-var-for-tests
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")))
341 (add-after 'install 'check
342 (assoc-ref %standard-phases 'check)))))
343 (synopsis "Secure, decentralized, peer-to-peer networking framework")
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/")))
354 (define-public guile-gnunet ;GSoC 2015!
355 (let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")
358 (name "guile-gnunet")
359 (version (git-version "0.0" revision commit))
363 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
365 (file-name (git-file-name name version))
368 "0nqc18jh9j30y4l6yh6j35byfg6qalq7yr3frv9rk10qa041c2sv"))))
369 (build-system gnu-build-system)
370 (native-inputs `(("pkg-config" ,pkg-config)
371 ("autoconf" ,autoconf-wrapper)
372 ("automake" ,automake)))
373 (inputs `(("guile" ,guile-2.0)
375 (synopsis "Guile bindings for GNUnet services")
377 "This package provides Guile bindings to the client libraries of various
378 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
380 (home-page "https://gnu.org/software/guix")
381 (license license:gpl3+))))
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)
392 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
396 "1zdzgq16h77w6ybwg3lqjsjr965np6iqvncqvkbj07glqd4wss0j"))))
399 (list "--with-libunique"
401 (string-append "--with-gnunet="
402 (assoc-ref %build-inputs "gnunet")))))
406 ("gnutls" ,gnutls/dane)
408 ("libextractor" ,libextractor)
409 ("libgcrypt" ,libgcrypt)
410 ("libunique" ,libunique)
411 ("qrencode" ,qrencode)))
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")))))