gnu: Use HTTPS for almost all gnu.org HOME-PAGEs.
[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 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 <contact.ng0@cryptolab.net>
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.3")
70 (source (origin
71 (method url-fetch)
72 (uri (string-append "mirror://gnu/libextractor/libextractor-"
73 version ".tar.gz"))
74 (sha256
75 (base32
76 "0zvv7wd011npcx7yphw9bpgivyxz6mlp87a57n96nv85k96dd2l6"))
77 (patches (search-patches "libextractor-ffmpeg-3.patch"))
78 (modules '((guix build utils)))
79 (snippet
80 ;; Nowadays libmagic (from 'file') returns 'audio/ogg' and not
81 ;; 'application/ogg'. Adjust accordingly.
82 '(substitute* "src/plugins/test_mime.c"
83 (("application/ogg")
84 "audio/ogg")))))
85 (build-system gnu-build-system)
86 ;; WARNING: Checks require /dev/shm to be in the build chroot, especially
87 ;; not to be a symbolic link to /run/shm.
88 ;; FIXME:
89 ;; The following dependencies are all optional, but should be
90 ;; available for maximum coverage:
91 ;; * libmagic (file)
92 ;; * librpm (rpm) ; investigate failure
93 ;; * libgif (giflib) ; investigate failure
94 (inputs
95 `(("exiv2" ,exiv2)
96 ("bzip2" ,bzip2)
97 ("flac" ,flac)
98 ("ffmpeg" ,ffmpeg)
99 ("file" ,file) ;libmagic, for the MIME plug-in
100 ("glib" ,glib)
101 ("gstreamer" ,gstreamer)
102 ("gst-plugins-base" ,gst-plugins-base)
103 ("gtk+" ,gtk+)
104 ("libarchive" ,libarchive)
105 ("libgsf" ,libgsf)
106 ("libjpeg" ,libjpeg)
107 ("libltdl" ,libltdl)
108 ("libmpeg2" ,libmpeg2)
109 ("libmp4v2" ,libmp4v2)
110 ("libsmf" ,libsmf)
111 ("tidy-html" ,tidy-html)
112 ("libogg" ,libogg)
113 ("libtiff" ,libtiff)
114 ("libvorbis" ,libvorbis)
115 ("zlib" ,zlib)))
116 (native-inputs
117 `(("pkg-config" ,pkg-config)))
118 (outputs '("out"
119 "static")) ; 396 KiB .a files
120 (arguments
121 `(#:configure-flags
122 (list (string-append "--with-ltdl="
123 (assoc-ref %build-inputs "libltdl"))
124 (string-append "--with-tidy="
125 (assoc-ref %build-inputs "tidy-html")))
126 #:parallel-tests? #f
127 #:phases
128 (modify-phases %standard-phases
129 (add-after 'install 'move-static-libraries
130 (lambda* (#:key outputs #:allow-other-keys)
131 ;; Move static libraries to the "static" output.
132 (let* ((out (assoc-ref outputs "out"))
133 (lib (string-append out "/lib"))
134 (static (assoc-ref outputs "static"))
135 (slib (string-append static "/lib")))
136 (mkdir-p slib)
137 (for-each (lambda (file)
138 (install-file file slib)
139 (delete-file file))
140 (find-files lib "\\.a$"))
141 #t))))))
142 (synopsis "Library to extract meta-data from media files")
143 (description
144 "GNU libextractor is a library for extracting metadata from files. It
145 supports a very large number of file formats, including audio files, document
146 files, and archive files. Each file format is implemented as a plugin, so
147 new formats can be added easily. The package also contains a command-line
148 tool to extract metadata from a file and print the results.")
149 (license license:gpl3+)
150 (home-page "https://www.gnu.org/software/libextractor/")))
151
152 (define-public libmicrohttpd
153 (package
154 (name "libmicrohttpd")
155 (version "0.9.52")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
159 version ".tar.gz"))
160 (sha256
161 (base32
162 "1smgxw6jv81yybg86bzr4c2sn7a31apf8q4zz0kpch9xfrp7yyal"))))
163 (build-system gnu-build-system)
164 (inputs
165 `(("curl" ,curl)
166 ("gnutls" ,gnutls)
167 ("libgcrypt" ,libgcrypt)
168 ("openssl" ,openssl)
169 ("zlib" ,zlib)))
170 (arguments
171 `(#:parallel-tests? #f))
172 (synopsis "C library implementing an HTTP 1.1 server")
173 (description
174 "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a
175 C library. It makes it easy to run an HTTP server as part of another
176 application. The library is fully HTTP 1.1 compliant. It can listen on
177 multiple ports, supports four different threading models, and supports
178 IPv6. It
179 also features security features such as basic and digest authentication
180 and support for SSL3 and TLS.")
181 (license license:lgpl2.1+)
182 (home-page "https://www.gnu.org/software/libmicrohttpd/")))
183
184 (define-public gnurl
185 (package
186 (name "gnurl")
187 (version "7.53.1")
188 (source (origin
189 (method url-fetch)
190 (uri (string-append "https://gnunet.org/sites/default/files/"
191 name "-" version ".tar.bz2"))
192 (sha256
193 (base32
194 "1ah2304cm6y7d201vdph170mrwxmg6r72v2zsxzjn0jk68d8kb6d"))))
195 (build-system gnu-build-system)
196 (outputs '("out"
197 "doc")) ; 1.5 MiB of man3 pages
198 (inputs `(("gnutls" ,gnutls)
199 ("libidn" ,libidn)
200 ("zlib" ,zlib)))
201 (native-inputs
202 `(("autoconf" ,autoconf)
203 ("automake" ,automake)
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 (add-before 'configure 'autoconf
236 ;; Clear artifacts left (shebangs) from release preparation.
237 (lambda _
238 (zero? (system* "./buildconf"))))
239 (replace 'check
240 (lambda _
241 ;; It is unclear why test1026 fails, however the content of it
242 ;; suggests that it is not vital for gnurl.
243 (delete-file "tests/data/test1026")
244
245 (substitute* "tests/runtests.pl"
246 (("/bin/sh") (which "sh")))
247
248 ;; Make test output more verbose.
249 (zero? (system* "make" "-C" "tests" "test"))
250 #t)))))
251 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
252 (description
253 "Gnurl is a microfork of cURL, a command line tool for transferring data
254 with URL syntax. While cURL supports many crypto backends, libgnurl only
255 supports HTTP, HTTPS and GnuTLS.")
256 (license (license:non-copyleft "file://COPYING"
257 "See COPYING in the distribution."))
258 (home-page "https://gnunet.org/gnurl")))
259
260 (define-public gnunet
261 (package
262 (name "gnunet")
263 (version "0.10.1")
264 (source
265 (origin
266 (method url-fetch)
267 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
268 ".tar.gz"))
269 (sha256
270 (base32
271 "04wxzm3wkgqbn42b8ksr4cx6m5cckyig5cls1adh0nwdczwvnp7n"))))
272 (build-system gnu-build-system)
273 (inputs
274 `(("glpk" ,glpk)
275 ("gnurl" ,gnurl)
276 ("gstreamer" ,gstreamer)
277 ("gst-plugins-base" ,gst-plugins-base)
278 ("gnutls" ,gnutls)
279 ("libextractor" ,libextractor)
280 ("libgcrypt" ,libgcrypt)
281 ("libidn" ,libidn)
282 ("libmicrohttpd" ,libmicrohttpd) ; hostlist, pt, contrib, and more
283 ("libltdl" ,libltdl)
284 ("libunistring" ,libunistring) ; fs and more
285 ("openssl" ,openssl) ; transport, certificate creation, contribs
286 ("opus" ,opus) ; gnunet-conversation
287 ("pulseaudio" ,pulseaudio) ; conversation
288 ("sqlite" ,sqlite) ; sqlite bindings, *store
289 ("zlib" ,zlib)
290 ("perl" ,perl) ; doxygen and more
291 ("jansson" ,jansson) ; identity, taler (external), gnunet-json, gns
292 ("nss" ,nss) ; gns
293 ("gmp" ,gmp) ; util
294 ("bluez" ,bluez) ; gnunet-transport
295 ("glib" ,glib)
296 ("libogg" ,libogg) ; gnunet-conversation
297 ("python-2" ,python-2))) ; tests, gnunet-qr
298 (native-inputs
299 `(("pkg-config" ,pkg-config)))
300 (arguments
301 '(#:configure-flags
302 (list (string-append "--with-nssdir=" %output "/lib"))
303 #:parallel-tests? #f
304 ;; test_gnunet_service_arm fails; reported upstream
305 #:tests? #f
306 #:phases
307 (modify-phases %standard-phases
308 ;; swap check and install phases and set paths to installed binaries
309 (add-before 'check 'set-path-for-check
310 (lambda* (#:key outputs #:allow-other-keys)
311 (let ((out (assoc-ref outputs "out")))
312 (setenv "GNUNET_PREFIX" (string-append out "/lib"))
313 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")))
314 #t))
315 (add-after 'install 'check
316 (assoc-ref %standard-phases 'check))
317 (delete 'check))))
318 (synopsis "Secure, decentralized, peer-to-peer networking framework")
319 (description
320 "GNUnet is a framework for secure peer-to-peer networking. The
321 high-level goal is to provide a strong foundation of free software for a
322 global, distributed network that provides security and privacy. GNUnet in
323 that sense aims to replace the current internet protocol stack. Along with
324 an application for secure publication of files, it has grown to include all
325 kinds of basic applications for the foundation of a GNU internet.")
326 (license license:gpl3+)
327 (home-page "https://gnunet.org/")))
328
329 (define-public guile-gnunet ;GSoC 2015!
330 (let ((commit "383eac2aab175d8d9ea5315c2f1c8a5055c76a52"))
331 (package
332 (name "guile-gnunet")
333 (version (string-append "0.0." (string-take commit 7)))
334 (source (origin
335 (method git-fetch)
336 (uri (git-reference
337 (url "git://git.sv.gnu.org/guix/gnunet.git")
338 (commit commit)))
339 (file-name (string-append name "-" version "-checkout"))
340 (sha256
341 (base32
342 "0k6mn28isjlxrnvbnblab3nh2xqx1b7san8k98kc35ap9lq0iz8w"))))
343 (build-system gnu-build-system)
344 (arguments
345 '(#:phases (modify-phases %standard-phases
346 (add-before 'configure 'bootstrap
347 (lambda _
348 (zero? (system* "autoreconf" "-vfi")))))))
349 (native-inputs `(("pkg-config" ,pkg-config)
350 ("autoconf" ,(autoconf-wrapper))
351 ("automake" ,automake)))
352 (inputs `(("guile" ,guile-2.0)
353 ("gnunet" ,gnunet)))
354 (synopsis "Guile bindings for GNUnet services")
355 (description
356 "This package provides Guile bindings to the client libraries of various
357 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
358 services.")
359 (home-page "https://gnu.org/software/guix")
360 (license license:gpl3+))))
361
362 ;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
363 ;; does not seem to be fully functional. This has been reported upstream:
364 ;; http://lists.gnu.org/archive/html/gnunet-developers/2016-02/msg00004.html
365 (define-public gnunet-gtk
366 (package (inherit gnunet)
367 (name "gnunet-gtk")
368 (version (package-version gnunet))
369 (source (origin
370 (method url-fetch)
371 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
372 version ".tar.gz"))
373 (sha256
374 (base32
375 "1p38k1s6a2fmcfc9a7cf1zrdycm9h06kqdyand4s3k500nj6mb4g"))))
376 (arguments
377 `(#:configure-flags
378 (list "--with-libunique"
379 "--with-qrencode"
380 (string-append "--with-gnunet="
381 (assoc-ref %build-inputs "gnunet")))))
382 (inputs
383 `(("gnunet" ,gnunet)
384 ("libgcrypt" ,libgcrypt)
385 ("gtk+" ,gtk+)
386 ("libextractor" ,libextractor)
387 ("glade3" ,glade3)
388 ("qrencode" ,qrencode)
389 ("libunique" ,libunique)))
390 (native-inputs
391 `(("pkg-config" ,pkg-config)
392 ("libglade" ,libglade)))
393 (synopsis "Graphical front-end tools for GNUnet")))