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>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
66 (define-public libextractor
72 (uri (string-append "mirror://gnu/libextractor/libextractor-"
76 "0zvv7wd011npcx7yphw9bpgivyxz6mlp87a57n96nv85k96dd2l6"))
77 (patches (search-patches "libextractor-ffmpeg-3.patch"))
78 (modules '((guix build utils)))
80 ;; Nowadays libmagic (from 'file') returns 'audio/ogg' and not
81 ;; 'application/ogg'. Adjust accordingly.
82 '(substitute* "src/plugins/test_mime.c"
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.
89 ;; The following dependencies are all optional, but should be
90 ;; available for maximum coverage:
92 ;; * librpm (rpm) ; investigate failure
93 ;; * libgif (giflib) ; investigate failure
99 ("file" ,file) ;libmagic, for the MIME plug-in
101 ("gstreamer" ,gstreamer)
102 ("gst-plugins-base" ,gst-plugins-base)
104 ("libarchive" ,libarchive)
108 ("libmpeg2" ,libmpeg2)
109 ("libmp4v2" ,libmp4v2)
111 ("tidy-html" ,tidy-html)
114 ("libvorbis" ,libvorbis)
117 `(("pkg-config" ,pkg-config)))
119 "static")) ; 396 KiB .a files
122 (list (string-append "--with-ltdl="
123 (assoc-ref %build-inputs "libltdl"))
124 (string-append "--with-tidy="
125 (assoc-ref %build-inputs "tidy-html")))
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")))
137 (for-each (lambda (file)
138 (install-file file slib)
140 (find-files lib "\\.a$"))
142 (synopsis "Library to extract meta-data from media files")
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/")))
152 (define-public libmicrohttpd
154 (name "libmicrohttpd")
158 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
162 "1smgxw6jv81yybg86bzr4c2sn7a31apf8q4zz0kpch9xfrp7yyal"))))
163 (build-system gnu-build-system)
167 ("libgcrypt" ,libgcrypt)
171 `(#:parallel-tests? #f))
172 (synopsis "C library implementing an HTTP 1.1 server")
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
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/")))
190 (uri (string-append "https://gnunet.org/sites/default/files/"
191 name "-" version ".tar.bz2"))
194 "1ah2304cm6y7d201vdph170mrwxmg6r72v2zsxzjn0jk68d8kb6d"))))
195 (build-system gnu-build-system)
197 "doc")) ; 1.5 MiB of man3 pages
198 (inputs `(("gnutls" ,gnutls)
202 `(("autoconf" ,autoconf)
203 ("automake" ,automake)
207 ("pkg-config" ,pkg-config)
208 ("python" ,python-2)))
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")
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"))
235 (add-before 'configure 'autoconf
236 ;; Clear artifacts left (shebangs) from release preparation.
238 (zero? (system* "./buildconf"))))
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")
245 (substitute* "tests/runtests.pl"
246 (("/bin/sh") (which "sh")))
248 ;; Make test output more verbose.
249 (zero? (system* "make" "-C" "tests" "test"))
251 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
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")))
260 (define-public gnunet
267 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
271 "04wxzm3wkgqbn42b8ksr4cx6m5cckyig5cls1adh0nwdczwvnp7n"))))
272 (build-system gnu-build-system)
276 ("gstreamer" ,gstreamer)
277 ("gst-plugins-base" ,gst-plugins-base)
279 ("libextractor" ,libextractor)
280 ("libgcrypt" ,libgcrypt)
282 ("libmicrohttpd" ,libmicrohttpd) ; hostlist, pt, contrib, and more
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
290 ("perl" ,perl) ; doxygen and more
291 ("jansson" ,jansson) ; identity, taler (external), gnunet-json, gns
294 ("bluez" ,bluez) ; gnunet-transport
296 ("libogg" ,libogg) ; gnunet-conversation
297 ("python-2" ,python-2))) ; tests, gnunet-qr
299 `(("pkg-config" ,pkg-config)))
302 (list (string-append "--with-nssdir=" %output "/lib"))
304 ;; test_gnunet_service_arm fails; reported upstream
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")))
315 (add-after 'install 'check
316 (assoc-ref %standard-phases 'check))
318 (synopsis "Secure, decentralized, peer-to-peer networking framework")
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/")))
329 (define-public guile-gnunet ;GSoC 2015!
330 (let ((commit "383eac2aab175d8d9ea5315c2f1c8a5055c76a52"))
332 (name "guile-gnunet")
333 (version (string-append "0.0." (string-take commit 7)))
337 (url "git://git.sv.gnu.org/guix/gnunet.git")
339 (file-name (string-append name "-" version "-checkout"))
342 "0k6mn28isjlxrnvbnblab3nh2xqx1b7san8k98kc35ap9lq0iz8w"))))
343 (build-system gnu-build-system)
345 '(#:phases (modify-phases %standard-phases
346 (add-before 'configure 'bootstrap
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)
354 (synopsis "Guile bindings for GNUnet services")
356 "This package provides Guile bindings to the client libraries of various
357 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
359 (home-page "https://gnu.org/software/guix")
360 (license license:gpl3+))))
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)
368 (version (package-version gnunet))
371 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
375 "1p38k1s6a2fmcfc9a7cf1zrdycm9h06kqdyand4s3k500nj6mb4g"))))
378 (list "--with-libunique"
380 (string-append "--with-gnunet="
381 (assoc-ref %build-inputs "gnunet")))))
384 ("libgcrypt" ,libgcrypt)
386 ("libextractor" ,libextractor)
388 ("qrencode" ,qrencode)
389 ("libunique" ,libunique)))
391 `(("pkg-config" ,pkg-config)
392 ("libglade" ,libglade)))
393 (synopsis "Graphical front-end tools for GNUnet")))