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