gnu: emacs-undo-tree: Update to 0.7.
[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 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2017, 2019 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>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
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.
19 ;;;
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.
24 ;;;
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/>.
27
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))
70
71 (define-public libextractor
72 (package
73 (name "libextractor")
74 (version "1.9")
75 (source (origin
76 (method url-fetch)
77 (uri (string-append "mirror://gnu/libextractor/libextractor-"
78 version ".tar.gz"))
79 (sha256
80 (base32
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.
86 ;; FIXME:
87 ;; The following dependencies are all optional, but should be
88 ;; available for maximum coverage:
89 ;; * libmagic (file)
90 ;; * librpm (rpm) ; investigate failure
91 ;; * libgif (giflib) ; investigate failure
92 (inputs
93 `(("exiv2" ,exiv2)
94 ("bzip2" ,bzip2)
95 ("flac" ,flac)
96 ("ffmpeg" ,ffmpeg-3.4)
97 ("file" ,file) ;libmagic, for the MIME plug-in
98 ("glib" ,glib)
99 ("gstreamer" ,gstreamer)
100 ("gst-plugins-base" ,gst-plugins-base)
101 ("gtk+" ,gtk+)
102 ("libarchive" ,libarchive)
103 ("libgsf" ,libgsf)
104 ("libjpeg" ,libjpeg)
105 ("libltdl" ,libltdl)
106 ("libmpeg2" ,libmpeg2)
107 ("libmp4v2" ,libmp4v2)
108 ("libsmf" ,libsmf)
109 ("tidy-html" ,tidy-html)
110 ("libogg" ,libogg)
111 ("libtiff" ,libtiff)
112 ("libvorbis" ,libvorbis)
113 ("zlib" ,zlib)))
114 (native-inputs
115 `(("pkg-config" ,pkg-config)))
116 (outputs '("out"
117 "static")) ; 396 KiB .a files
118 (arguments
119 `(#:configure-flags
120 (list (string-append "--with-ltdl="
121 (assoc-ref %build-inputs "libltdl"))
122 (string-append "--with-tidy="
123 (assoc-ref %build-inputs "tidy-html")))
124 #:parallel-tests? #f
125 #:phases
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")))
134 (mkdir-p slib)
135 (for-each (lambda (file)
136 (install-file file slib)
137 (delete-file file))
138 (find-files lib "\\.a$"))
139 #t))))))
140 (synopsis "Library to extract meta-data from media files")
141 (description
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/")))
149
150 (define-public libmicrohttpd
151 (package
152 (name "libmicrohttpd")
153 (version "0.9.69")
154 (source (origin
155 (method url-fetch)
156 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
157 version ".tar.gz"))
158 (sha256
159 (base32
160 "0zp34zgcahym5kp2r83gfb5wnr8yf643a26k6zk96x3qica6p6zv"))))
161 (build-system gnu-build-system)
162 (inputs
163 `(("curl" ,curl)
164 ("gnutls" ,gnutls/dane)
165 ("libgcrypt" ,libgcrypt)
166 ("openssl" ,openssl)
167 ("zlib" ,zlib)))
168 (synopsis "C library implementing an HTTP 1.1 server")
169 (description
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/")))
178
179 (define-public gnurl
180 (package
181 (name "gnurl")
182 (version "7.63.0")
183 (source (origin
184 (method url-fetch)
185 (uri (string-append "mirror://gnu/gnunet/" name "-" version ".tar.Z"))
186 (sha256
187 (base32
188 "021b3pdfnqywk5q07y48kxyz7g4jjg35dk3cv0ps0x50qjr4ix33"))))
189 (build-system gnu-build-system)
190 (outputs '("out"
191 "doc")) ; 1.7 MiB of man3 pages
192 (inputs `(("gnutls" ,gnutls/dane)
193 ("libidn" ,libidn)
194 ("zlib" ,zlib)))
195 (native-inputs
196 `(("libtool" ,libtool)
197 ("groff" ,groff)
198 ("perl" ,perl)
199 ("pkg-config" ,pkg-config)
200 ("python" ,python-2)))
201 (arguments
202 `(#:configure-flags (list "--disable-ntlm-wb")
203 #:test-target "test"
204 #:parallel-tests? #f
205 #:phases
206 ;; We have to patch runtests.pl in tests/ directory
207 (modify-phases %standard-phases
208 (add-after 'install 'move-man3-pages
209 (lambda* (#:key outputs #:allow-other-keys)
210 ;; Move section 3 man pages to "doc".
211 (let ((out (assoc-ref outputs "out"))
212 (doc (assoc-ref outputs "doc")))
213 (mkdir-p (string-append doc "/share/man"))
214 (rename-file (string-append out "/share/man/man3")
215 (string-append doc "/share/man/man3"))
216 #t)))
217 (replace 'check
218 (lambda _
219 (substitute* "tests/runtests.pl"
220 (("/bin/sh") (which "sh")))
221
222 ;; Make test output more verbose.
223 (invoke "make" "-C" "tests" "test"))))))
224 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
225 (description
226 "Gnurl is a microfork of cURL, a command line tool for transferring data
227 with URL syntax. While cURL supports many crypto backends, libgnurl only
228 supports HTTP, HTTPS and GnuTLS.")
229 (license (license:non-copyleft "file://COPYING"
230 "See COPYING in the distribution."))
231 (properties '((ftp-server . "ftp.gnu.org")
232 (ftp-directory . "/gnunet")))
233 (home-page "https://gnunet.org/gnurl")))
234
235 (define-public gnunet
236 (package
237 (name "gnunet")
238 (version "0.11.8")
239 (source
240 (origin
241 (method url-fetch)
242 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
243 ".tar.gz"))
244 (sha256
245 (base32
246 "1zkmcq75sfr3iyg8rgxp9dbl7fwsvc1a71rc0vgisghcbrx1n7yj"))))
247 (build-system gnu-build-system)
248 (inputs
249 `(("bluez" ,bluez)
250 ("glpk" ,glpk)
251 ("gnurl" ,gnurl)
252 ("gnutls" ,gnutls/dane)
253 ("gstreamer" ,gstreamer)
254 ("jansson" ,jansson)
255 ("libextractor" ,libextractor)
256 ("libidn" ,libidn2)
257 ("libgcrypt" ,libgcrypt)
258 ("libltdl" ,libltdl)
259 ("libmicrohttpd" ,libmicrohttpd)
260 ("libogg" ,libogg)
261 ("libunistring" ,libunistring)
262 ("miniupnpc" ,miniupnpc)
263 ("opus" ,opus)
264 ("pulseaudio" ,pulseaudio)
265 ("sqlite" ,sqlite)
266 ("zbar" ,zbar)
267 ("zlib" ,zlib)))
268 (native-inputs
269 `(("pkg-config" ,pkg-config)
270 ("python" ,python)
271 ("xxd" ,xxd)
272 ("which" ,(@ (gnu packages base) which))))
273 (arguments
274 '(#:parallel-tests? #f ; Parallel tests aren't supported.
275 #:phases
276 (modify-phases %standard-phases
277 (add-after 'configure 'remove-failing-tests
278 ;; These tests fail in Guix's building envrionment.
279 (lambda _
280 (substitute* "src/transport/Makefile"
281 (("test_transport_api_udp_nat\\$\\(EXEEXT\\) \\\\\n") "")
282 (("test_transport_api_manipulation_cfg\\$\\(EXEEXT\\) \\\\\n") ""))
283 (substitute* "src/topology/Makefile"
284 (("^check_PROGRAMS.*") "\n")
285 (("test_gnunet_daemon_topology\\$\\(EXEEXT\\)\n") ""))
286 (substitute* "src/namestore/Makefile"
287 (("\\$\\(am__append_2\\)") ""))
288 (substitute* "src/gns/Makefile"
289 (("\\$\\(am__append_4\\)") ""))
290 (substitute* "contrib/Makefile"
291 (("^check_PROGRAMS.*") "\n"))
292 ;; 'test' from coreutils doesn't behave as the test expects.
293 (substitute* '("src/gns/gnunet-gns-proxy-setup-ca.in"
294 "src/transport/gnunet-transport-certificate-creation.in")
295 (("gnutls-certtool") "certtool"))
296 #t))
297 ;; Swap 'check and 'install phases and add installed binaries to $PATH.
298 (add-before 'check 'set-path-for-check
299 (lambda* (#:key outputs #:allow-other-keys)
300 (let ((out (assoc-ref outputs "out")))
301 (setenv "GNUNET_PREFIX" (string-append out "/lib"))
302 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")))
303 #t))
304 (delete 'check)
305 (add-after 'install 'check
306 (assoc-ref %standard-phases 'check)))))
307 (synopsis "Secure, decentralized, peer-to-peer networking framework")
308 (description
309 "GNUnet is a framework for secure peer-to-peer networking. The
310 high-level goal is to provide a strong foundation of free software for a
311 global, distributed network that provides security and privacy. GNUnet in
312 that sense aims to replace the current internet protocol stack. Along with
313 an application for secure publication of files, it has grown to include all
314 kinds of basic applications for the foundation of a GNU internet.")
315 (license license:agpl3+)
316 (home-page "https://gnunet.org/")))
317
318 (define-public guile-gnunet ;GSoC 2015!
319 (let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")
320 (revision "1"))
321 (package
322 (name "guile-gnunet")
323 (version (git-version "0.0" revision commit))
324 (source (origin
325 (method git-fetch)
326 (uri (git-reference
327 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
328 (commit commit)))
329 (file-name (git-file-name name version))
330 (sha256
331 (base32
332 "0nqc18jh9j30y4l6yh6j35byfg6qalq7yr3frv9rk10qa041c2sv"))))
333 (build-system gnu-build-system)
334 (native-inputs `(("pkg-config" ,pkg-config)
335 ("autoconf" ,autoconf-wrapper)
336 ("automake" ,automake)))
337 (inputs `(("guile" ,guile-2.0)
338 ("gnunet" ,gnunet)))
339 (synopsis "Guile bindings for GNUnet services")
340 (description
341 "This package provides Guile bindings to the client libraries of various
342 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
343 services.")
344 (home-page "https://gnu.org/software/guix")
345 (license license:gpl3+))))
346
347 ;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
348 ;; does not seem to be fully functional. This has been reported upstream:
349 ;; http://lists.gnu.org/archive/html/gnunet-developers/2016-02/msg00004.html
350 (define-public gnunet-gtk
351 (package (inherit gnunet)
352 (name "gnunet-gtk")
353 (version "0.11.7")
354 (source (origin
355 (method url-fetch)
356 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
357 version ".tar.gz"))
358 (sha256
359 (base32
360 "061ifhqk6q9kx71z5404fm4d60yj2dihlwwmdqmhkn5nn4bvcwb5"))))
361 (arguments
362 `(#:configure-flags
363 (list "--with-libunique"
364 "--with-qrencode"
365 (string-append "--with-gnunet="
366 (assoc-ref %build-inputs "gnunet")))))
367 (inputs
368 `(("glade3" ,glade3)
369 ("gnunet" ,gnunet)
370 ("gnutls" ,gnutls/dane)
371 ("gtk+" ,gtk+)
372 ("libextractor" ,libextractor)
373 ("libgcrypt" ,libgcrypt)
374 ("libunique" ,libunique)
375 ("qrencode" ,qrencode)))
376 (native-inputs
377 `(("pkg-config" ,pkg-config)
378 ("libglade" ,libglade)))
379 (synopsis "Graphical front-end tools for GNUnet")
380 (properties '((ftp-server . "ftp.gnu.org")
381 (ftp-directory . "/gnunet")))))