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 ng0 <ng0@n0.is>
9 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
11 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages gnunet)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages file)
31 #:use-module (gnu packages aidc)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages curl)
35 #:use-module (gnu packages gettext)
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages gnupg)
39 #:use-module (gnu packages groff)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages guile)
42 #:use-module (gnu packages gstreamer)
43 #:use-module (gnu packages libidn)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages image)
46 #:use-module (gnu packages libunistring)
47 #:use-module (gnu packages maths)
48 #:use-module (gnu packages multiprecision)
49 #:use-module (gnu packages music)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages nss)
52 #:use-module (gnu packages package-management)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages pulseaudio)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages sqlite)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages upnp)
60 #:use-module (gnu packages video)
61 #:use-module (gnu packages vim)
62 #:use-module (gnu packages web)
63 #:use-module (gnu packages xiph)
64 #:use-module (gnu packages backup)
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (guix packages)
67 #:use-module (guix download)
68 #:use-module (guix git-download)
69 #:use-module (guix build-system gnu))
71 (define-public libextractor
77 (uri (string-append "mirror://gnu/libextractor/libextractor-"
81 "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh"))
82 (patches (search-patches "libextractor-exiv2.patch"))))
83 (build-system gnu-build-system)
84 ;; WARNING: Checks require /dev/shm to be in the build chroot, especially
85 ;; not to be a symbolic link to /run/shm.
87 ;; The following dependencies are all optional, but should be
88 ;; available for maximum coverage:
90 ;; * librpm (rpm) ; investigate failure
91 ;; * libgif (giflib) ; investigate failure
97 ("file" ,file) ;libmagic, for the MIME plug-in
99 ("gstreamer" ,gstreamer)
100 ("gst-plugins-base" ,gst-plugins-base)
102 ("libarchive" ,libarchive)
106 ("libmpeg2" ,libmpeg2)
107 ("libmp4v2" ,libmp4v2)
109 ("tidy-html" ,tidy-html)
112 ("libvorbis" ,libvorbis)
115 `(("pkg-config" ,pkg-config)))
117 "static")) ; 396 KiB .a files
120 (list (string-append "--with-ltdl="
121 (assoc-ref %build-inputs "libltdl"))
122 (string-append "--with-tidy="
123 (assoc-ref %build-inputs "tidy-html")))
126 (modify-phases %standard-phases
127 (add-after 'install 'move-static-libraries
128 (lambda* (#:key outputs #:allow-other-keys)
129 ;; Move static libraries to the "static" output.
130 (let* ((out (assoc-ref outputs "out"))
131 (lib (string-append out "/lib"))
132 (static (assoc-ref outputs "static"))
133 (slib (string-append static "/lib")))
135 (for-each (lambda (file)
136 (install-file file slib)
138 (find-files lib "\\.a$"))
140 (synopsis "Library to extract meta-data from media files")
142 "GNU libextractor is a library for extracting metadata from files. It
143 supports a very large number of file formats, including audio files, document
144 files, and archive files. Each file format is implemented as a plugin, so
145 new formats can be added easily. The package also contains a command-line
146 tool to extract metadata from a file and print the results.")
147 (license license:gpl3+)
148 (home-page "https://www.gnu.org/software/libextractor/")))
150 (define-public libmicrohttpd
152 (name "libmicrohttpd")
156 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
160 "0zp34zgcahym5kp2r83gfb5wnr8yf643a26k6zk96x3qica6p6zv"))))
161 (build-system gnu-build-system)
164 ("gnutls" ,gnutls/dane)
165 ("libgcrypt" ,libgcrypt)
168 (synopsis "C library implementing an HTTP 1.1 server")
170 "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a
171 C library. It makes it easy to run an HTTP server as part of another
172 application. The library is fully HTTP 1.1 compliant. It can listen on
173 multiple ports, supports four different threading models, and supports
174 IPv6. It also features security features such as basic and digest
175 authentication and support for SSL3 and TLS.")
176 (license license:lgpl2.1+)
177 (home-page "https://www.gnu.org/software/libmicrohttpd/")))
185 (uri (string-append "mirror://gnu/gnunet/" name "-" version ".tar.Z"))
188 "0ssjz2npr2zjvcpfz9qbaj92xc9ayg8wx4hyl132snl94qr2v670"))))
189 (build-system gnu-build-system)
191 "doc")) ; 1.8 MiB of man3 pages
192 (inputs `(("gnutls" ,gnutls/dane)
196 `(("libtool" ,libtool)
198 ("pkg-config" ,pkg-config)
202 ;; All of these produce errors during configure.
203 (list "--disable-ftp"
220 (modify-phases %standard-phases
221 (add-after 'install 'move-man3-pages
222 (lambda* (#:key outputs #:allow-other-keys)
223 ;; Move section 3 man pages to "doc".
224 (let ((out (assoc-ref outputs "out"))
225 (doc (assoc-ref outputs "doc")))
226 (mkdir-p (string-append doc "/share/man"))
227 (rename-file (string-append out "/share/man/man3")
228 (string-append doc "/share/man/man3"))
230 ;; We have to patch runtests.pl in tests/ directory
233 (substitute* "tests/runtests.pl"
234 (("/bin/sh") (which "sh")))
236 ;; Make test output more verbose.
237 (invoke "make" "-C" "tests" "test"))))))
238 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
240 "Gnurl is a microfork of cURL, a command line tool for transferring data
241 with URL syntax. While cURL supports many crypto backends, libgnurl only
242 supports HTTP, HTTPS and GnuTLS.")
243 (license (license:non-copyleft "file://COPYING"
244 "See COPYING in the distribution."))
245 (properties '((ftp-server . "ftp.gnu.org")
246 (ftp-directory . "/gnunet")))
247 (home-page "https://gnunet.org/gnurl")))
249 (define-public gnunet
256 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
260 "1zkmcq75sfr3iyg8rgxp9dbl7fwsvc1a71rc0vgisghcbrx1n7yj"))))
261 (build-system gnu-build-system)
266 ("gnutls" ,gnutls/dane)
267 ("gstreamer" ,gstreamer)
269 ("libextractor" ,libextractor)
271 ("libgcrypt" ,libgcrypt)
273 ("libmicrohttpd" ,libmicrohttpd)
275 ("libunistring" ,libunistring)
276 ("miniupnpc" ,miniupnpc)
278 ("pulseaudio" ,pulseaudio)
283 `(("pkg-config" ,pkg-config)
286 ("which" ,(@ (gnu packages base) which))))
288 '(#:parallel-tests? #f ; Parallel tests aren't supported.
290 (modify-phases %standard-phases
291 (add-after 'configure 'remove-failing-tests
292 ;; These tests fail in Guix's building envrionment.
294 (substitute* "src/transport/Makefile"
295 (("test_transport_api_udp_nat\\$\\(EXEEXT\\) \\\\\n") "")
296 (("test_transport_api_manipulation_cfg\\$\\(EXEEXT\\) \\\\\n") ""))
297 (substitute* "src/topology/Makefile"
298 (("^check_PROGRAMS.*") "\n")
299 (("test_gnunet_daemon_topology\\$\\(EXEEXT\\)\n") ""))
300 (substitute* "src/namestore/Makefile"
301 (("\\$\\(am__append_2\\)") ""))
302 (substitute* "src/gns/Makefile"
303 (("\\$\\(am__append_4\\)") ""))
304 (substitute* "contrib/Makefile"
305 (("^check_PROGRAMS.*") "\n"))
306 ;; 'test' from coreutils doesn't behave as the test expects.
307 (substitute* '("src/gns/gnunet-gns-proxy-setup-ca.in"
308 "src/transport/gnunet-transport-certificate-creation.in")
309 (("gnutls-certtool") "certtool"))
311 ;; Swap 'check and 'install phases and add installed binaries to $PATH.
312 (add-before 'check 'set-path-for-check
313 (lambda* (#:key outputs #:allow-other-keys)
314 (let ((out (assoc-ref outputs "out")))
315 (setenv "GNUNET_PREFIX" (string-append out "/lib"))
316 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")))
319 (add-after 'install 'check
320 (assoc-ref %standard-phases 'check)))))
321 (synopsis "Secure, decentralized, peer-to-peer networking framework")
323 "GNUnet is a framework for secure peer-to-peer networking. The
324 high-level goal is to provide a strong foundation of free software for a
325 global, distributed network that provides security and privacy. GNUnet in
326 that sense aims to replace the current internet protocol stack. Along with
327 an application for secure publication of files, it has grown to include all
328 kinds of basic applications for the foundation of a GNU internet.")
329 (license license:agpl3+)
330 (home-page "https://gnunet.org/")))
332 (define-public guile-gnunet ;GSoC 2015!
333 (let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")
336 (name "guile-gnunet")
337 (version (git-version "0.0" revision commit))
341 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
343 (file-name (git-file-name name version))
346 "0nqc18jh9j30y4l6yh6j35byfg6qalq7yr3frv9rk10qa041c2sv"))))
347 (build-system gnu-build-system)
348 (native-inputs `(("pkg-config" ,pkg-config)
349 ("autoconf" ,autoconf-wrapper)
350 ("automake" ,automake)))
351 (inputs `(("guile" ,guile-2.0)
353 (synopsis "Guile bindings for GNUnet services")
355 "This package provides Guile bindings to the client libraries of various
356 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
358 (home-page "https://gnu.org/software/guix")
359 (license license:gpl3+))))
361 ;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
362 ;; does not seem to be fully functional. This has been reported upstream:
363 ;; http://lists.gnu.org/archive/html/gnunet-developers/2016-02/msg00004.html
364 (define-public gnunet-gtk
365 (package (inherit gnunet)
370 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
374 "061ifhqk6q9kx71z5404fm4d60yj2dihlwwmdqmhkn5nn4bvcwb5"))))
377 (list "--with-libunique"
379 (string-append "--with-gnunet="
380 (assoc-ref %build-inputs "gnunet")))))
384 ("gnutls" ,gnutls/dane)
386 ("libextractor" ,libextractor)
387 ("libgcrypt" ,libgcrypt)
388 ("libunique" ,libunique)
389 ("qrencode" ,qrencode)))
391 `(("pkg-config" ,pkg-config)
392 ("libglade" ,libglade)))
393 (synopsis "Graphical front-end tools for GNUnet")
394 (properties '((ftp-server . "ftp.gnu.org")
395 (ftp-directory . "/gnunet")))))