gnu: r-org-dm-eg-db: Update to 3.5.0.
[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 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015 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 ng0 <ng0@infotropique.org>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages gnunet)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages file)
28 #:use-module (gnu packages aidc)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages gettext)
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages gnome)
35 #:use-module (gnu packages gnupg)
36 #:use-module (gnu packages gnuzilla)
37 #:use-module (gnu packages groff)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages guile)
40 #:use-module (gnu packages gstreamer)
41 #:use-module (gnu packages libidn)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages libunistring)
45 #:use-module (gnu packages maths)
46 #:use-module (gnu packages multiprecision)
47 #:use-module (gnu packages music)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages package-management)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages pulseaudio)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages databases)
55 #:use-module (gnu packages tls)
56 #:use-module (gnu packages video)
57 #:use-module (gnu packages web)
58 #:use-module (gnu packages xiph)
59 #:use-module (gnu packages backup)
60 #:use-module ((guix licenses) #:prefix license:)
61 #:use-module (guix packages)
62 #:use-module (guix download)
63 #:use-module (guix git-download)
64 #:use-module (guix build-system gnu))
65
66 (define-public libextractor
67 (package
68 (name "libextractor")
69 (version "1.6")
70 (source (origin
71 (method url-fetch)
72 (uri (string-append "mirror://gnu/libextractor/libextractor-"
73 version ".tar.gz"))
74 (sha256
75 (base32
76 "17gnpgspdhfgcr27j8sn9105vb4lw22yqdrhic62l79q5v5avm16"))))
77 (build-system gnu-build-system)
78 ;; WARNING: Checks require /dev/shm to be in the build chroot, especially
79 ;; not to be a symbolic link to /run/shm.
80 ;; FIXME:
81 ;; The following dependencies are all optional, but should be
82 ;; available for maximum coverage:
83 ;; * libmagic (file)
84 ;; * librpm (rpm) ; investigate failure
85 ;; * libgif (giflib) ; investigate failure
86 (inputs
87 `(("exiv2" ,exiv2)
88 ("bzip2" ,bzip2)
89 ("flac" ,flac)
90 ("ffmpeg" ,ffmpeg)
91 ("file" ,file) ;libmagic, for the MIME plug-in
92 ("glib" ,glib)
93 ("gstreamer" ,gstreamer)
94 ("gst-plugins-base" ,gst-plugins-base)
95 ("gtk+" ,gtk+)
96 ("libarchive" ,libarchive)
97 ("libgsf" ,libgsf)
98 ("libjpeg" ,libjpeg)
99 ("libltdl" ,libltdl)
100 ("libmpeg2" ,libmpeg2)
101 ("libmp4v2" ,libmp4v2)
102 ("libsmf" ,libsmf)
103 ("tidy-html" ,tidy-html)
104 ("libogg" ,libogg)
105 ("libtiff" ,libtiff)
106 ("libvorbis" ,libvorbis)
107 ("zlib" ,zlib)))
108 (native-inputs
109 `(("pkg-config" ,pkg-config)))
110 (outputs '("out"
111 "static")) ; 396 KiB .a files
112 (arguments
113 `(#:configure-flags
114 (list (string-append "--with-ltdl="
115 (assoc-ref %build-inputs "libltdl"))
116 (string-append "--with-tidy="
117 (assoc-ref %build-inputs "tidy-html")))
118 #:parallel-tests? #f
119 #:phases
120 (modify-phases %standard-phases
121 (add-after 'install 'move-static-libraries
122 (lambda* (#:key outputs #:allow-other-keys)
123 ;; Move static libraries to the "static" output.
124 (let* ((out (assoc-ref outputs "out"))
125 (lib (string-append out "/lib"))
126 (static (assoc-ref outputs "static"))
127 (slib (string-append static "/lib")))
128 (mkdir-p slib)
129 (for-each (lambda (file)
130 (install-file file slib)
131 (delete-file file))
132 (find-files lib "\\.a$"))
133 #t))))))
134 (synopsis "Library to extract meta-data from media files")
135 (description
136 "GNU libextractor is a library for extracting metadata from files. It
137 supports a very large number of file formats, including audio files, document
138 files, and archive files. Each file format is implemented as a plugin, so
139 new formats can be added easily. The package also contains a command-line
140 tool to extract metadata from a file and print the results.")
141 (license license:gpl3+)
142 (home-page "https://www.gnu.org/software/libextractor/")))
143
144 (define-public libmicrohttpd
145 (package
146 (name "libmicrohttpd")
147 (version "0.9.55")
148 (source (origin
149 (method url-fetch)
150 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
151 version ".tar.gz"))
152 (sha256
153 (base32
154 "1y6h1slav5l6k8zyb01dpw65dscdgxxgfa3a0z9qnn7jr66sn70c"))))
155 (build-system gnu-build-system)
156 (inputs
157 `(("curl" ,curl)
158 ("gnutls" ,gnutls/dane)
159 ("libgcrypt" ,libgcrypt)
160 ("openssl" ,openssl)
161 ("zlib" ,zlib)))
162 (arguments
163 `(#:parallel-tests? #f
164 #:phases (modify-phases %standard-phases
165 (add-before 'check 'add-missing-LDFLAGS
166 (lambda _
167 ;; The two test_upgrade* programs depend on GnuTLS
168 ;; directly but lack -lgnutls; add it.
169 (substitute* "src/microhttpd/Makefile"
170 (("^test_upgrade(.*)LDFLAGS = (.*)$" _ first rest)
171 (string-append "test_upgrade" first
172 "LDFLAGS = -lgnutls " rest)))
173 #t)))))
174 (synopsis "C library implementing an HTTP 1.1 server")
175 (description
176 "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a
177 C library. It makes it easy to run an HTTP server as part of another
178 application. The library is fully HTTP 1.1 compliant. It can listen on
179 multiple ports, supports four different threading models, and supports
180 IPv6. It
181 also features security features such as basic and digest authentication
182 and support for SSL3 and TLS.")
183 (license license:lgpl2.1+)
184 (home-page "https://www.gnu.org/software/libmicrohttpd/")))
185
186 (define-public gnurl
187 (package
188 (name "gnurl")
189 (version "7.56.1")
190 (source (origin
191 (method url-fetch)
192 (uri (string-append "https://gnunet.org/sites/default/files/"
193 name "-" version ".tar.bz2"))
194 (sha256
195 (base32
196 "0phbs3lw0a561fqsj4fyngmpaznjlnx4qx9n9xzglivy69r9j1n8"))))
197 (build-system gnu-build-system)
198 (outputs '("out"
199 "doc")) ; 1.5 MiB of man3 pages
200 (inputs `(("gnutls" ,gnutls/dane)
201 ("libidn" ,libidn)
202 ("zlib" ,zlib)))
203 (native-inputs
204 `(("libtool" ,libtool)
205 ("groff" ,groff)
206 ("perl" ,perl)
207 ("pkg-config" ,pkg-config)
208 ("python" ,python-2)))
209 (arguments
210 `(#:configure-flags '("--enable-ipv6" "--with-gnutls" "--without-libssh2"
211 "--without-libmetalink" "--without-winidn"
212 "--without-librtmp" "--without-nghttp2"
213 "--without-nss" "--without-cyassl"
214 "--without-polarssl" "--without-ssl"
215 "--without-winssl" "--without-darwinssl"
216 "--disable-sspi" "--disable-ntlm-wb"
217 "--disable-ldap" "--disable-rtsp" "--disable-dict"
218 "--disable-telnet" "--disable-tftp" "--disable-pop3"
219 "--disable-imap" "--disable-smtp" "--disable-gopher"
220 "--disable-file" "--disable-ftp" "--disable-smb")
221 #:test-target "test"
222 #:parallel-tests? #f
223 #:phases
224 ;; We have to patch runtests.pl in tests/ directory
225 (modify-phases %standard-phases
226 (add-after 'install 'move-man3-pages
227 (lambda* (#:key outputs #:allow-other-keys)
228 ;; Move section 3 man pages to "doc".
229 (let ((out (assoc-ref outputs "out"))
230 (doc (assoc-ref outputs "doc")))
231 (mkdir-p (string-append doc "/share/man"))
232 (rename-file (string-append out "/share/man/man3")
233 (string-append doc "/share/man/man3"))
234 #t)))
235 (replace 'check
236 (lambda _
237 (substitute* "tests/runtests.pl"
238 (("/bin/sh") (which "sh")))
239
240 ;; Make test output more verbose.
241 (zero? (system* "make" "-C" "tests" "test"))
242 #t)))))
243 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
244 (description
245 "Gnurl is a microfork of cURL, a command line tool for transferring data
246 with URL syntax. While cURL supports many crypto backends, libgnurl only
247 supports HTTP, HTTPS and GnuTLS.")
248 (license (license:non-copyleft "file://COPYING"
249 "See COPYING in the distribution."))
250 (home-page "https://gnunet.org/gnurl")))
251
252 (define-public gnunet
253 (package
254 (name "gnunet")
255 (version "0.10.1")
256 (source
257 (origin
258 (method url-fetch)
259 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
260 ".tar.gz"))
261 (sha256
262 (base32
263 "04wxzm3wkgqbn42b8ksr4cx6m5cckyig5cls1adh0nwdczwvnp7n"))))
264 (build-system gnu-build-system)
265 (inputs
266 `(("glpk" ,glpk)
267 ("gnurl" ,gnurl)
268 ("gstreamer" ,gstreamer)
269 ("gst-plugins-base" ,gst-plugins-base)
270 ("gnutls" ,gnutls/dane)
271 ("libextractor" ,libextractor)
272 ("libgcrypt" ,libgcrypt)
273 ("libidn" ,libidn)
274 ("libmicrohttpd" ,libmicrohttpd) ; hostlist, pt, contrib, and more
275 ("libltdl" ,libltdl)
276 ("libunistring" ,libunistring) ; fs and more
277 ("openssl" ,openssl) ; transport, certificate creation, contribs
278 ("opus" ,opus) ; gnunet-conversation
279 ("pulseaudio" ,pulseaudio) ; conversation
280 ("sqlite" ,sqlite) ; sqlite bindings, *store
281 ("zlib" ,zlib)
282 ("perl" ,perl) ; doxygen and more
283 ("jansson" ,jansson) ; identity, taler (external), gnunet-json, gns
284 ("nss" ,nss) ; gns
285 ("gmp" ,gmp) ; util
286 ("bluez" ,bluez) ; gnunet-transport
287 ("glib" ,glib)
288 ("libogg" ,libogg) ; gnunet-conversation
289 ("python-2" ,python-2))) ; tests, gnunet-qr
290 (native-inputs
291 `(("pkg-config" ,pkg-config)))
292 (arguments
293 '(#:configure-flags
294 (list (string-append "--with-nssdir=" %output "/lib"))
295 #:parallel-tests? #f
296 ;; test_gnunet_service_arm fails; reported upstream
297 #:tests? #f
298 #:phases
299 (modify-phases %standard-phases
300 ;; swap check and install phases and set paths to installed binaries
301 (add-before 'check 'set-path-for-check
302 (lambda* (#:key outputs #:allow-other-keys)
303 (let ((out (assoc-ref outputs "out")))
304 (setenv "GNUNET_PREFIX" (string-append out "/lib"))
305 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")))
306 #t))
307 (add-after 'install 'check
308 (assoc-ref %standard-phases 'check))
309 (delete 'check))))
310 (synopsis "Secure, decentralized, peer-to-peer networking framework")
311 (description
312 "GNUnet is a framework for secure peer-to-peer networking. The
313 high-level goal is to provide a strong foundation of free software for a
314 global, distributed network that provides security and privacy. GNUnet in
315 that sense aims to replace the current internet protocol stack. Along with
316 an application for secure publication of files, it has grown to include all
317 kinds of basic applications for the foundation of a GNU internet.")
318 (license license:gpl3+)
319 (home-page "https://gnunet.org/")))
320
321 (define-public guile-gnunet ;GSoC 2015!
322 (let ((commit "383eac2aab175d8d9ea5315c2f1c8a5055c76a52"))
323 (package
324 (name "guile-gnunet")
325 (version (string-append "0.0." (string-take commit 7)))
326 (source (origin
327 (method git-fetch)
328 (uri (git-reference
329 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
330 (commit commit)))
331 (file-name (string-append name "-" version "-checkout"))
332 (sha256
333 (base32
334 "0k6mn28isjlxrnvbnblab3nh2xqx1b7san8k98kc35ap9lq0iz8w"))))
335 (build-system gnu-build-system)
336 (arguments
337 '(#:phases (modify-phases %standard-phases
338 (add-after 'unpack 'bootstrap
339 (lambda _
340 (zero? (system* "autoreconf" "-vfi")))))))
341 (native-inputs `(("pkg-config" ,pkg-config)
342 ("autoconf" ,(autoconf-wrapper))
343 ("automake" ,automake)))
344 (inputs `(("guile" ,guile-2.0)
345 ("gnunet" ,gnunet)))
346 (synopsis "Guile bindings for GNUnet services")
347 (description
348 "This package provides Guile bindings to the client libraries of various
349 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
350 services.")
351 (home-page "https://gnu.org/software/guix")
352 (license license:gpl3+))))
353
354 ;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
355 ;; does not seem to be fully functional. This has been reported upstream:
356 ;; http://lists.gnu.org/archive/html/gnunet-developers/2016-02/msg00004.html
357 (define-public gnunet-gtk
358 (package (inherit gnunet)
359 (name "gnunet-gtk")
360 (version (package-version gnunet))
361 (source (origin
362 (method url-fetch)
363 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
364 version ".tar.gz"))
365 (sha256
366 (base32
367 "1p38k1s6a2fmcfc9a7cf1zrdycm9h06kqdyand4s3k500nj6mb4g"))))
368 (arguments
369 `(#:configure-flags
370 (list "--with-libunique"
371 "--with-qrencode"
372 (string-append "--with-gnunet="
373 (assoc-ref %build-inputs "gnunet")))))
374 (inputs
375 `(("gnunet" ,gnunet)
376 ("libgcrypt" ,libgcrypt)
377 ("gtk+" ,gtk+)
378 ("libextractor" ,libextractor)
379 ("glade3" ,glade3)
380 ("qrencode" ,qrencode)
381 ("libunique" ,libunique)))
382 (native-inputs
383 `(("pkg-config" ,pkg-config)
384 ("libglade" ,libglade)))
385 (synopsis "Graphical front-end tools for GNUnet")))