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