gnu: packages: Use 'search-patches' everywhere.
[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 Ni* Gillmann <ng@niasterisk.space>
7 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.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 geeqie)
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 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 image)
43 #:use-module (gnu packages libunistring)
44 #:use-module (gnu packages maths)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pulseaudio)
48 #:use-module (gnu packages python)
49 #:use-module (gnu packages databases)
50 #:use-module (gnu packages tls)
51 #:use-module (gnu packages video)
52 #:use-module (gnu packages xiph)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix packages)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix build-system gnu))
58
59 (define-public libextractor
60 (package
61 (name "libextractor")
62 (version "1.3")
63 (source (origin
64 (method url-fetch)
65 (uri (string-append "mirror://gnu/libextractor/libextractor-"
66 version ".tar.gz"))
67 (sha256
68 (base32
69 "0zvv7wd011npcx7yphw9bpgivyxz6mlp87a57n96nv85k96dd2l6"))
70 (patches (search-patches "libextractor-ffmpeg-3.patch"))
71 (modules '((guix build utils)))
72 (snippet
73 ;; Nowadays libmagic (from 'file') returns 'audio/ogg' and not
74 ;; 'application/ogg'. Adjust accordingly.
75 '(substitute* "src/plugins/test_mime.c"
76 (("application/ogg")
77 "audio/ogg")))))
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 ;; * libarchive
85 ;; * libgif (giflib)
86 ;; * libgtk+ >= 3.0.0 (may probably drop glib then as a propagated input of
87 ;; gtk)
88 ;; * libgsf
89 ;; * libmagic (file)
90 ;; * libmpeg2
91 ;; * libmp4v2
92 ;; * librpm
93 ;; * libsmf
94 ;; * libtidy
95 (inputs
96 `(("exiv2" ,exiv2)
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 ("libjpeg" ,libjpeg)
104 ("libogg" ,libogg)
105 ("libtiff" ,libtiff)
106 ("libltdl" ,libltdl)
107 ("libvorbis" ,libvorbis)
108 ("zlib" ,zlib)))
109 (native-inputs
110 `(("pkg-config" ,pkg-config)))
111 (synopsis "Library to extract meta-data from media files")
112 (description
113 "GNU libextractor is a library for extracting metadata from files. It
114 supports a very large number of file formats, including audio files, document
115 files, and archive files. Each file format is implemented as a plugin, so
116 new formats can be added easily. The package also contains a command-line
117 tool to extract metadata from a file and print the results.")
118 (license license:gpl3+)
119 (home-page "http://www.gnu.org/software/libextractor/")))
120
121 (define-public libmicrohttpd
122 (package
123 (name "libmicrohttpd")
124 (version "0.9.48")
125 (source (origin
126 (method url-fetch)
127 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
128 version ".tar.gz"))
129 (sha256
130 (base32
131 "1952z36lf31jy0x19r4y389d9188wgzmdqh2l28wdy1biwapwrl7"))))
132 (build-system gnu-build-system)
133 (inputs
134 `(("curl" ,curl)
135 ("gnutls" ,gnutls)
136 ("libgcrypt" ,libgcrypt)
137 ("openssl" ,openssl)
138 ("zlib" ,zlib)))
139 (arguments
140 `(#:parallel-tests? #f))
141 (synopsis "C library implementing an HTTP 1.1 server")
142 (description
143 "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a
144 C library. It makes it easy to run an HTTP server as part of another
145 application. The library is fully HTTP 1.1 compliant. It can listen on
146 multiple ports, supports four different threading models, and supports
147 IPv6. It
148 also features security features such as basic and digest authentication
149 and support for SSL3 and TLS.")
150 (license license:lgpl2.1+)
151 (home-page "http://www.gnu.org/software/libmicrohttpd/")))
152
153 (define-public gnurl
154 (package
155 (name "gnurl")
156 (version "7.45.0")
157 (source (origin
158 (method url-fetch)
159 (uri (string-append "https://gnunet.org/sites/default/files/gnurl-"
160 version ".tar.bz2"))
161 (sha256
162 (base32 "0hd8w4wyjwagd4k6vm6srphqbmysz08rcwf8z7f4b2d6d2yrn3mm"))))
163 (build-system gnu-build-system)
164 (inputs `(("gnutls" ,gnutls)
165 ("libidn" ,libidn)
166 ("zlib" ,zlib)))
167 (native-inputs
168 `(("groff" ,groff)
169 ("perl" ,perl)
170 ("pkg-config" ,pkg-config)
171 ("python" ,python-2)))
172 (arguments
173 `(#:configure-flags '("--enable-ipv6" "--with-gnutls" "--without-libssh2"
174 "--without-libmetalink" "--without-winidn"
175 "--without-librtmp" "--without-nghttp2"
176 "--without-nss" "--without-cyassl"
177 "--without-polarssl" "--without-ssl"
178 "--without-winssl" "--without-darwinssl"
179 "--disable-sspi" "--disable-ntlm-wb"
180 "--disable-ldap" "--disable-rtsp" "--disable-dict"
181 "--disable-telnet" "--disable-tftp" "--disable-pop3"
182 "--disable-imap" "--disable-smtp" "--disable-gopher"
183 "--disable-file" "--disable-ftp")
184 #:test-target "test"
185 #:parallel-tests? #f
186 ;; We have to patch runtests.pl in tests/ directory
187 #:phases
188 (alist-cons-before
189 'check 'patch-runtests
190 (lambda _
191 (substitute* "tests/runtests.pl"
192 (("/bin/sh") (which "sh"))))
193 %standard-phases)))
194 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
195 (description
196 "Gnurl is a microfork of cURL, a command line tool for transferring data
197 with URL syntax. While cURL supports many crypto backends, libgnurl only
198 supports HTTPS, HTTPS and GnuTLS.")
199 (license (license:non-copyleft "file://COPYING"
200 "See COPYING in the distribution."))
201 (home-page "https://gnunet.org/gnurl")))
202
203 (define-public gnunet
204 (package
205 (name "gnunet")
206 (version "0.10.1")
207 (source
208 (origin
209 (method url-fetch)
210 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
211 ".tar.gz"))
212 (sha256 (base32
213 "04wxzm3wkgqbn42b8ksr4cx6m5cckyig5cls1adh0nwdczwvnp7n"))))
214 (build-system gnu-build-system)
215 (inputs
216 `(("glpk" ,glpk)
217 ("gnurl" ,gnurl)
218 ("gstreamer" ,gstreamer)
219 ("gst-plugins-base" ,gst-plugins-base)
220 ("gnutls" ,gnutls)
221 ("libextractor" ,libextractor)
222 ("libgcrypt" ,libgcrypt)
223 ("libidn" ,libidn)
224 ("libmicrohttpd" ,libmicrohttpd)
225 ("libltdl" ,libltdl)
226 ("libunistring" ,libunistring)
227 ("openssl" ,openssl)
228 ("opus" ,opus)
229 ("pulseaudio" ,pulseaudio)
230 ("sqlite" ,sqlite)
231 ("zlib" ,zlib)))
232 (native-inputs
233 `(("pkg-config" ,pkg-config)
234 ("python" ,python-2)))
235 (arguments
236 '(#:configure-flags
237 (list (string-append "--with-nssdir=" %output "/lib"))
238 #:parallel-tests? #f
239 ;; test_gnunet_service_arm fails; reported upstream
240 #:tests? #f
241 #:phases
242 ;; swap check and install phases and set paths to installed binaries
243 (alist-cons-before
244 'check 'set-path-for-check
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let ((out (assoc-ref outputs "out")))
247 (setenv "GNUNET_PREFIX" (string-append out "/lib"))
248 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))))
249 (alist-cons-after
250 'install 'check
251 (assoc-ref %standard-phases 'check)
252 (alist-delete
253 'check
254 %standard-phases)))))
255 (synopsis "Secure, decentralized, peer-to-peer networking framework")
256 (description
257 "GNUnet is a framework for secure peer-to-peer networking that does not
258 use any centralized or otherwise trusted services. Our high-level goal is to
259 provide a strong free software foundation for a global network that provides
260 security and privacy. GNUnet started with an idea for anonymous
261 censorship-resistant file-sharing, but has grown to incorporate other
262 applications as well as many generic building blocks for secure networking
263 applications. In particular, GNUnet now includes the GNU Name System, a
264 privacy-preserving, decentralized public key infrastructure.")
265 (license license:gpl3+)
266 (home-page "https://gnunet.org/")))
267
268 (define-public guile-gnunet ;GSoC 2015!
269 (let ((commit "383eac2"))
270 (package
271 (name "guile-gnunet")
272 (version (string-append "0.0." commit))
273 (source (origin
274 (method git-fetch)
275 (uri (git-reference
276 (url "git://git.sv.gnu.org/guix/gnunet.git")
277 (commit commit)))
278 (file-name (string-append name "-" version "-checkout"))
279 (sha256
280 (base32
281 "0k6mn28isjlxrnvbnblab3nh2xqx1b7san8k98kc35ap9lq0iz8w"))))
282 (build-system gnu-build-system)
283 (arguments
284 '(#:phases (modify-phases %standard-phases
285 (add-before 'configure 'bootstrap
286 (lambda _
287 (zero? (system* "autoreconf" "-vfi")))))))
288 (native-inputs `(("pkg-config" ,pkg-config)
289 ("autoconf" ,(autoconf-wrapper))
290 ("automake" ,automake)))
291 (inputs `(("guile" ,guile-2.0)
292 ("gnunet" ,gnunet)))
293 (synopsis "Guile bindings for GNUnet services")
294 (description
295 "This package provides Guile bindings to the client libraries of various
296 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
297 services.")
298 (home-page "http://gnu.org/software/guix")
299 (license license:gpl3+))))
300
301 ;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
302 ;; does not seem to be fully functional. This has been reported upstream:
303 ;; http://lists.gnu.org/archive/html/gnunet-developers/2016-02/msg00004.html
304 (define-public gnunet-gtk
305 (package (inherit gnunet)
306 (name "gnunet-gtk")
307 (version (package-version gnunet))
308 (source (origin
309 (method url-fetch)
310 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
311 version ".tar.gz"))
312 (sha256
313 (base32
314 "1p38k1s6a2fmcfc9a7cf1zrdycm9h06kqdyand4s3k500nj6mb4g"))))
315 (arguments
316 `(#:configure-flags
317 (list "--without-libunique"
318 "--with-qrencode")))
319 (inputs
320 `(("gnunet" ,gnunet)
321 ("libgcrypt" ,libgcrypt)
322 ("gtk+" ,gtk+)
323 ("libextractor" ,libextractor)
324 ("glade3" ,glade3)
325 ("qrencode" ,qrencode)))
326 (native-inputs
327 `(("pkg-config" ,pkg-config)
328 ("libglade" ,libglade)))
329 (synopsis "Graphical front-end tools for GNUnet")))