gnu: emacs-sly: Update to 20200228.
[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>
aff0cce9 4;;; Copyright © 2015, 2017, 2018, 2019 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>
a3f2c295 8;;; Copyright © 2016, 2017, 2018, 2019 ng0 <ng0@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>
eb4b2ab6
AE
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)
266b39fc 29 #:use-module (gnu packages)
2fd22ec5 30 #:use-module (gnu packages file)
3ccdd430 31 #:use-module (gnu packages aidc)
eb4b2ab6
AE
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages compression)
88065ec2 34 #:use-module (gnu packages curl)
1dba6407 35 #:use-module (gnu packages gettext)
eb4b2ab6 36 #:use-module (gnu packages glib)
3ccdd430 37 #:use-module (gnu packages gnome)
88065ec2 38 #:use-module (gnu packages gnupg)
a85cb486 39 #:use-module (gnu packages groff)
3ccdd430 40 #:use-module (gnu packages gtk)
59698c2c 41 #:use-module (gnu packages guile)
248c0645 42 #:use-module (gnu packages gstreamer)
a85cb486 43 #:use-module (gnu packages libidn)
6adda006 44 #:use-module (gnu packages linux)
e55354b8 45 #:use-module (gnu packages image)
266b39fc
SHT
46 #:use-module (gnu packages libunistring)
47 #:use-module (gnu packages maths)
6adda006 48 #:use-module (gnu packages multiprecision)
b0a2addd 49 #:use-module (gnu packages music)
6adda006 50 #:use-module (gnu packages ncurses)
aff0cce9 51 #:use-module (gnu packages nss)
b0a2addd 52 #:use-module (gnu packages package-management)
eb4b2ab6 53 #:use-module (gnu packages pkg-config)
a85cb486 54 #:use-module (gnu packages perl)
266b39fc 55 #:use-module (gnu packages pulseaudio)
a85cb486 56 #:use-module (gnu packages python)
cd0322a3 57 #:use-module (gnu packages sqlite)
a7fd7b68 58 #:use-module (gnu packages tls)
edce1993 59 #:use-module (gnu packages upnp)
248c0645 60 #:use-module (gnu packages video)
edce1993 61 #:use-module (gnu packages vim)
6adda006 62 #:use-module (gnu packages web)
54ff0b7d 63 #:use-module (gnu packages xiph)
cd372ca3 64 #:use-module (gnu packages backup)
b5b73a82 65 #:use-module ((guix licenses) #:prefix license:)
eb4b2ab6
AE
66 #:use-module (guix packages)
67 #:use-module (guix download)
59698c2c 68 #:use-module (guix git-download)
eb4b2ab6
AE
69 #:use-module (guix build-system gnu))
70
71(define-public libextractor
72 (package
73 (name "libextractor")
a3f2c295 74 (version "1.9")
eb4b2ab6
AE
75 (source (origin
76 (method url-fetch)
77 (uri (string-append "mirror://gnu/libextractor/libextractor-"
78 version ".tar.gz"))
79 (sha256
80 (base32
2cb81e1e
LC
81 "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh"))
82 (patches (search-patches "libextractor-exiv2.patch"))))
eb4b2ab6
AE
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:
eb4b2ab6 89 ;; * libmagic (file)
b0a2addd 90 ;; * librpm (rpm) ; investigate failure
cd372ca3 91 ;; * libgif (giflib) ; investigate failure
eb4b2ab6 92 (inputs
2e838890 93 `(("exiv2" ,exiv2)
b0a2addd 94 ("bzip2" ,bzip2)
eb4b2ab6 95 ("flac" ,flac)
c44ba525 96 ("ffmpeg" ,ffmpeg)
2fd22ec5 97 ("file" ,file) ;libmagic, for the MIME plug-in
eb4b2ab6 98 ("glib" ,glib)
248c0645
AE
99 ("gstreamer" ,gstreamer)
100 ("gst-plugins-base" ,gst-plugins-base)
cd372ca3 101 ("gtk+" ,gtk+)
102 ("libarchive" ,libarchive)
103 ("libgsf" ,libgsf)
eb4b2ab6 104 ("libjpeg" ,libjpeg)
cd372ca3 105 ("libltdl" ,libltdl)
106 ("libmpeg2" ,libmpeg2)
b0a2addd 107 ("libmp4v2" ,libmp4v2)
108 ("libsmf" ,libsmf)
109 ("tidy-html" ,tidy-html)
eb4b2ab6
AE
110 ("libogg" ,libogg)
111 ("libtiff" ,libtiff)
eb4b2ab6 112 ("libvorbis" ,libvorbis)
eb4b2ab6 113 ("zlib" ,zlib)))
c4c4cc05 114 (native-inputs
cd372ca3 115 `(("pkg-config" ,pkg-config)))
ff711960 116 (outputs '("out"
117 "static")) ; 396 KiB .a files
cd372ca3 118 (arguments
119 `(#:configure-flags
120 (list (string-append "--with-ltdl="
b0a2addd 121 (assoc-ref %build-inputs "libltdl"))
122 (string-append "--with-tidy="
123 (assoc-ref %build-inputs "tidy-html")))
ff711960 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))))))
eb4b2ab6
AE
140 (synopsis "Library to extract meta-data from media files")
141 (description
79c311b8 142 "GNU libextractor is a library for extracting metadata from files. It
a22dc0c4
LC
143supports a very large number of file formats, including audio files, document
144files, and archive files. Each file format is implemented as a plugin, so
79c311b8 145new formats can be added easily. The package also contains a command-line
a22dc0c4 146tool to extract metadata from a file and print the results.")
eb4b2ab6 147 (license license:gpl3+)
6fd52309 148 (home-page "https://www.gnu.org/software/libextractor/")))
88065ec2
AE
149
150(define-public libmicrohttpd
151 (package
152 (name "libmicrohttpd")
2392e589 153 (version "0.9.70")
88065ec2
AE
154 (source (origin
155 (method url-fetch)
156 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
157 version ".tar.gz"))
158 (sha256
159 (base32
2392e589 160 "01vkjy89b1ylmh22dy5yza2r414nfwcfixxh3v29nvzrjv9s7l4h"))))
88065ec2
AE
161 (build-system gnu-build-system)
162 (inputs
163 `(("curl" ,curl)
1472f630 164 ("gnutls" ,gnutls/dane)
88065ec2
AE
165 ("libgcrypt" ,libgcrypt)
166 ("openssl" ,openssl)
167 ("zlib" ,zlib)))
168 (synopsis "C library implementing an HTTP 1.1 server")
169 (description
dce17227
AE
170 "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a
171C library. It makes it easy to run an HTTP server as part of another
a22dc0c4 172application. The library is fully HTTP 1.1 compliant. It can listen on
dce17227 173multiple ports, supports four different threading models, and supports
ff6dcc1a
EF
174IPv6. It also features security features such as basic and digest
175authentication and support for SSL3 and TLS.")
88065ec2 176 (license license:lgpl2.1+)
b02b9a52 177 (home-page "https://www.gnu.org/software/libmicrohttpd/")))
a85cb486
SHT
178
179(define-public gnurl
180 (package
181 (name "gnurl")
cf7ca6fe 182 (version "7.67.0")
a85cb486
SHT
183 (source (origin
184 (method url-fetch)
c10679f5 185 (uri (string-append "mirror://gnu/gnunet/" name "-" version ".tar.Z"))
a85cb486 186 (sha256
7012e2c7 187 (base32
cf7ca6fe 188 "0ssjz2npr2zjvcpfz9qbaj92xc9ayg8wx4hyl132snl94qr2v670"))))
a85cb486 189 (build-system gnu-build-system)
50e9f81a 190 (outputs '("out"
cf7ca6fe 191 "doc")) ; 1.8 MiB of man3 pages
fd67e3a2 192 (inputs `(("gnutls" ,gnutls/dane)
cf7ca6fe 193 ("libidn2" ,libidn2)
a85cb486
SHT
194 ("zlib" ,zlib)))
195 (native-inputs
a35e0033 196 `(("libtool" ,libtool)
7af52bd5
SHT
197 ("perl" ,perl)
198 ("pkg-config" ,pkg-config)
cf7ca6fe 199 ("python" ,python)))
a85cb486 200 (arguments
cf7ca6fe
EF
201 `(#:configure-flags
202 ;; All of these produce errors during configure.
203 (list "--disable-ftp"
204 "--disable-file"
205 "--disable-ldap"
206 "--disable-rtsp"
207 "--disable-dict"
208 "--disable-telnet"
209 "--disable-tftp"
210 "--disable-pop3"
211 "--disable-imap"
212 "--disable-smb"
213 "--disable-smtp"
214 "--disable-gopher"
215 "--without-ssl"
216 "--without-libpsl"
217 "--without-librtmp"
218 "--disable-ntlm-wb")
c543b4e1 219 #:phases
b9fe72bf 220 (modify-phases %standard-phases
50e9f81a 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"))
229 #t)))
cf7ca6fe 230 ;; We have to patch runtests.pl in tests/ directory
4ec08b63 231 (replace 'check
a0e43c9f 232 (lambda _
b9fe72bf
EF
233 (substitute* "tests/runtests.pl"
234 (("/bin/sh") (which "sh")))
4ec08b63 235
236 ;; Make test output more verbose.
0741c3a4 237 (invoke "make" "-C" "tests" "test"))))))
a85cb486
SHT
238 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
239 (description
240 "Gnurl is a microfork of cURL, a command line tool for transferring data
35b9e423 241with URL syntax. While cURL supports many crypto backends, libgnurl only
5f9d5905 242supports HTTP, HTTPS and GnuTLS.")
166191b3
LC
243 (license (license:non-copyleft "file://COPYING"
244 "See COPYING in the distribution."))
5f2122fb
EF
245 (properties '((ftp-server . "ftp.gnu.org")
246 (ftp-directory . "/gnunet")))
a85cb486 247 (home-page "https://gnunet.org/gnurl")))
266b39fc
SHT
248
249(define-public gnunet
250 (package
251 (name "gnunet")
edce1993 252 (version "0.11.8")
266b39fc
SHT
253 (source
254 (origin
255 (method url-fetch)
256 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
257 ".tar.gz"))
6adda006 258 (sha256
259 (base32
edce1993 260 "1zkmcq75sfr3iyg8rgxp9dbl7fwsvc1a71rc0vgisghcbrx1n7yj"))))
266b39fc
SHT
261 (build-system gnu-build-system)
262 (inputs
edce1993
EF
263 `(("bluez" ,bluez)
264 ("glpk" ,glpk)
05e8a0b0 265 ("gnurl" ,gnurl)
6a5f7af6 266 ("gnutls" ,gnutls/dane)
edce1993
EF
267 ("gstreamer" ,gstreamer)
268 ("jansson" ,jansson)
266b39fc 269 ("libextractor" ,libextractor)
edce1993 270 ("libidn" ,libidn2)
266b39fc 271 ("libgcrypt" ,libgcrypt)
3246cc91 272 ("libltdl" ,libltdl)
edce1993
EF
273 ("libmicrohttpd" ,libmicrohttpd)
274 ("libogg" ,libogg)
275 ("libunistring" ,libunistring)
276 ("miniupnpc" ,miniupnpc)
277 ("opus" ,opus)
278 ("pulseaudio" ,pulseaudio)
279 ("sqlite" ,sqlite)
280 ("zbar" ,zbar)
281 ("zlib" ,zlib)))
266b39fc 282 (native-inputs
edce1993
EF
283 `(("pkg-config" ,pkg-config)
284 ("python" ,python)
285 ("xxd" ,xxd)
286 ("which" ,(@ (gnu packages base) which))))
266b39fc 287 (arguments
edce1993 288 '(#:parallel-tests? #f ; Parallel tests aren't supported.
f944fbf1 289 #:phases
90d8ef6b 290 (modify-phases %standard-phases
edce1993
EF
291 (add-after 'configure 'remove-failing-tests
292 ;; These tests fail in Guix's building envrionment.
293 (lambda _
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"))
310 #t))
311 ;; Swap 'check and 'install phases and add installed binaries to $PATH.
90d8ef6b
EF
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")))
317 #t))
edce1993 318 (delete 'check)
90d8ef6b 319 (add-after 'install 'check
edce1993 320 (assoc-ref %standard-phases 'check)))))
574e86f9 321 (synopsis "Secure, decentralized, peer-to-peer networking framework")
266b39fc 322 (description
a3947cb1
LC
323 "GNUnet is a framework for secure peer-to-peer networking. The
324high-level goal is to provide a strong foundation of free software for a
325global, distributed network that provides security and privacy. GNUnet in
326that sense aims to replace the current internet protocol stack. Along with
327an application for secure publication of files, it has grown to include all
328kinds of basic applications for the foundation of a GNU internet.")
94cc994e 329 (license license:agpl3+)
266b39fc 330 (home-page "https://gnunet.org/")))
59698c2c
LC
331
332(define-public guile-gnunet ;GSoC 2015!
5651e74c
AV
333 (let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")
334 (revision "1"))
59698c2c
LC
335 (package
336 (name "guile-gnunet")
5651e74c 337 (version (git-version "0.0" revision commit))
59698c2c
LC
338 (source (origin
339 (method git-fetch)
340 (uri (git-reference
5f13bf09 341 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
59698c2c 342 (commit commit)))
5651e74c 343 (file-name (git-file-name name version))
59698c2c
LC
344 (sha256
345 (base32
5651e74c 346 "0nqc18jh9j30y4l6yh6j35byfg6qalq7yr3frv9rk10qa041c2sv"))))
59698c2c 347 (build-system gnu-build-system)
59698c2c 348 (native-inputs `(("pkg-config" ,pkg-config)
464f5447 349 ("autoconf" ,autoconf-wrapper)
59698c2c
LC
350 ("automake" ,automake)))
351 (inputs `(("guile" ,guile-2.0)
352 ("gnunet" ,gnunet)))
353 (synopsis "Guile bindings for GNUnet services")
354 (description
355 "This package provides Guile bindings to the client libraries of various
356GNUnet services, including the @dfn{identity} and @dfn{file sharing}
357services.")
cc04b099 358 (home-page "https://gnu.org/software/guix")
59698c2c 359 (license license:gpl3+))))
3ccdd430 360
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)
366 (name "gnunet-gtk")
dbdd7707 367 (version "0.11.7")
3ccdd430 368 (source (origin
369 (method url-fetch)
370 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
371 version ".tar.gz"))
372 (sha256
373 (base32
dbdd7707 374 "061ifhqk6q9kx71z5404fm4d60yj2dihlwwmdqmhkn5nn4bvcwb5"))))
3ccdd430 375 (arguments
376 `(#:configure-flags
d8bc4729 377 (list "--with-libunique"
9b12bc70 378 "--with-qrencode"
379 (string-append "--with-gnunet="
380 (assoc-ref %build-inputs "gnunet")))))
3ccdd430 381 (inputs
2f6500fa
EF
382 `(("glade3" ,glade3)
383 ("gnunet" ,gnunet)
dbdd7707 384 ("gnutls" ,gnutls/dane)
3ccdd430 385 ("gtk+" ,gtk+)
386 ("libextractor" ,libextractor)
2f6500fa
EF
387 ("libgcrypt" ,libgcrypt)
388 ("libunique" ,libunique)
389 ("qrencode" ,qrencode)))
3ccdd430 390 (native-inputs
391 `(("pkg-config" ,pkg-config)
392 ("libglade" ,libglade)))
baac9ff9
EF
393 (synopsis "Graphical front-end tools for GNUnet")
394 (properties '((ftp-server . "ftp.gnu.org")
395 (ftp-directory . "/gnunet")))))