Revert "gnu: groff: Disable relocatability."
[jackhill/guix/guix.git] / gnu / packages / gnunet.scm
CommitLineData
eb4b2ab6 1;;; GNU Guix --- Functional package management for GNU
8ca73fce 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
05e8a0b0 3;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
189be331 4;;; Copyright © 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
c5c42f0a 5;;; Copyright © 2015, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
3ccdd430 6;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
fd7fd3c1 7;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
4a78fd46 8;;; Copyright © 2016, 2017, 2018 Nils Gillmann <ng0@n0.is>
5de4653d 9;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
1983a9b0 10;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
eb4b2ab6
AE
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)
266b39fc 28 #:use-module (gnu packages)
2fd22ec5 29 #:use-module (gnu packages file)
3ccdd430 30 #:use-module (gnu packages aidc)
eb4b2ab6
AE
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages compression)
88065ec2 33 #:use-module (gnu packages curl)
1dba6407 34 #:use-module (gnu packages gettext)
eb4b2ab6 35 #:use-module (gnu packages glib)
3ccdd430 36 #:use-module (gnu packages gnome)
88065ec2 37 #:use-module (gnu packages gnupg)
6adda006 38 #:use-module (gnu packages gnuzilla)
a85cb486 39 #:use-module (gnu packages groff)
3ccdd430 40 #:use-module (gnu packages gtk)
59698c2c 41 #:use-module (gnu packages guile)
248c0645 42 #:use-module (gnu packages gstreamer)
a85cb486 43 #:use-module (gnu packages libidn)
6adda006 44 #:use-module (gnu packages linux)
e55354b8 45 #:use-module (gnu packages image)
266b39fc
SHT
46 #:use-module (gnu packages libunistring)
47 #:use-module (gnu packages maths)
6adda006 48 #:use-module (gnu packages multiprecision)
b0a2addd 49 #:use-module (gnu packages music)
6adda006 50 #:use-module (gnu packages ncurses)
b0a2addd 51 #:use-module (gnu packages package-management)
eb4b2ab6 52 #:use-module (gnu packages pkg-config)
a85cb486 53 #:use-module (gnu packages perl)
266b39fc 54 #:use-module (gnu packages pulseaudio)
a85cb486 55 #:use-module (gnu packages python)
cd0322a3 56 #:use-module (gnu packages sqlite)
a7fd7b68 57 #:use-module (gnu packages tls)
248c0645 58 #:use-module (gnu packages video)
6adda006 59 #:use-module (gnu packages web)
54ff0b7d 60 #:use-module (gnu packages xiph)
cd372ca3 61 #:use-module (gnu packages backup)
b5b73a82 62 #:use-module ((guix licenses) #:prefix license:)
eb4b2ab6
AE
63 #:use-module (guix packages)
64 #:use-module (guix download)
59698c2c 65 #:use-module (guix git-download)
eb4b2ab6
AE
66 #:use-module (guix build-system gnu))
67
68(define-public libextractor
69 (package
70 (name "libextractor")
1983a9b0 71 (version "1.8")
eb4b2ab6
AE
72 (source (origin
73 (method url-fetch)
74 (uri (string-append "mirror://gnu/libextractor/libextractor-"
75 version ".tar.gz"))
8f36c8e9
AV
76 (patches (search-patches "libextractor-CVE-2018-20430.patch"
77 "libextractor-CVE-2018-20431.patch"))
eb4b2ab6
AE
78 (sha256
79 (base32
1983a9b0 80 "1z1cb35griqzvshqdv5ck98dy0sgpsswn7fgiy7lbzi34sma8dg2"))))
eb4b2ab6
AE
81 (build-system gnu-build-system)
82 ;; WARNING: Checks require /dev/shm to be in the build chroot, especially
83 ;; not to be a symbolic link to /run/shm.
84 ;; FIXME:
85 ;; The following dependencies are all optional, but should be
86 ;; available for maximum coverage:
eb4b2ab6 87 ;; * libmagic (file)
b0a2addd 88 ;; * librpm (rpm) ; investigate failure
cd372ca3 89 ;; * libgif (giflib) ; investigate failure
eb4b2ab6 90 (inputs
2e838890 91 `(("exiv2" ,exiv2)
b0a2addd 92 ("bzip2" ,bzip2)
eb4b2ab6 93 ("flac" ,flac)
06079c19 94 ("ffmpeg" ,ffmpeg-3.4)
2fd22ec5 95 ("file" ,file) ;libmagic, for the MIME plug-in
eb4b2ab6 96 ("glib" ,glib)
248c0645
AE
97 ("gstreamer" ,gstreamer)
98 ("gst-plugins-base" ,gst-plugins-base)
cd372ca3 99 ("gtk+" ,gtk+)
100 ("libarchive" ,libarchive)
101 ("libgsf" ,libgsf)
eb4b2ab6 102 ("libjpeg" ,libjpeg)
cd372ca3 103 ("libltdl" ,libltdl)
104 ("libmpeg2" ,libmpeg2)
b0a2addd 105 ("libmp4v2" ,libmp4v2)
106 ("libsmf" ,libsmf)
107 ("tidy-html" ,tidy-html)
eb4b2ab6
AE
108 ("libogg" ,libogg)
109 ("libtiff" ,libtiff)
eb4b2ab6 110 ("libvorbis" ,libvorbis)
eb4b2ab6 111 ("zlib" ,zlib)))
c4c4cc05 112 (native-inputs
cd372ca3 113 `(("pkg-config" ,pkg-config)))
ff711960 114 (outputs '("out"
115 "static")) ; 396 KiB .a files
cd372ca3 116 (arguments
117 `(#:configure-flags
118 (list (string-append "--with-ltdl="
b0a2addd 119 (assoc-ref %build-inputs "libltdl"))
120 (string-append "--with-tidy="
121 (assoc-ref %build-inputs "tidy-html")))
ff711960 122 #:parallel-tests? #f
123 #:phases
124 (modify-phases %standard-phases
125 (add-after 'install 'move-static-libraries
126 (lambda* (#:key outputs #:allow-other-keys)
127 ;; Move static libraries to the "static" output.
128 (let* ((out (assoc-ref outputs "out"))
129 (lib (string-append out "/lib"))
130 (static (assoc-ref outputs "static"))
131 (slib (string-append static "/lib")))
132 (mkdir-p slib)
133 (for-each (lambda (file)
134 (install-file file slib)
135 (delete-file file))
136 (find-files lib "\\.a$"))
137 #t))))))
eb4b2ab6
AE
138 (synopsis "Library to extract meta-data from media files")
139 (description
79c311b8 140 "GNU libextractor is a library for extracting metadata from files. It
a22dc0c4
LC
141supports a very large number of file formats, including audio files, document
142files, and archive files. Each file format is implemented as a plugin, so
79c311b8 143new formats can be added easily. The package also contains a command-line
a22dc0c4 144tool to extract metadata from a file and print the results.")
eb4b2ab6 145 (license license:gpl3+)
6fd52309 146 (home-page "https://www.gnu.org/software/libextractor/")))
88065ec2
AE
147
148(define-public libmicrohttpd
149 (package
150 (name "libmicrohttpd")
47719c9b 151 (version "0.9.62")
88065ec2
AE
152 (source (origin
153 (method url-fetch)
154 (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
155 version ".tar.gz"))
156 (sha256
157 (base32
47719c9b 158 "0jfvi1fb4im3a3m8qishbmzx3zch993c0mhvl2k92l1zf1yhjgmx"))))
88065ec2
AE
159 (build-system gnu-build-system)
160 (inputs
161 `(("curl" ,curl)
1472f630 162 ("gnutls" ,gnutls/dane)
88065ec2
AE
163 ("libgcrypt" ,libgcrypt)
164 ("openssl" ,openssl)
165 ("zlib" ,zlib)))
dce17227 166 (arguments
e1ecc890
LC
167 `(#:parallel-tests? #f
168 #:phases (modify-phases %standard-phases
169 (add-before 'check 'add-missing-LDFLAGS
170 (lambda _
171 ;; The two test_upgrade* programs depend on GnuTLS
172 ;; directly but lack -lgnutls; add it.
173 (substitute* "src/microhttpd/Makefile"
174 (("^test_upgrade(.*)LDFLAGS = (.*)$" _ first rest)
175 (string-append "test_upgrade" first
176 "LDFLAGS = -lgnutls " rest)))
177 #t)))))
88065ec2
AE
178 (synopsis "C library implementing an HTTP 1.1 server")
179 (description
dce17227
AE
180 "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a
181C library. It makes it easy to run an HTTP server as part of another
a22dc0c4 182application. The library is fully HTTP 1.1 compliant. It can listen on
dce17227 183multiple ports, supports four different threading models, and supports
ff6dcc1a
EF
184IPv6. It also features security features such as basic and digest
185authentication and support for SSL3 and TLS.")
88065ec2 186 (license license:lgpl2.1+)
b02b9a52 187 (home-page "https://www.gnu.org/software/libmicrohttpd/")))
a85cb486
SHT
188
189(define-public gnurl
190 (package
191 (name "gnurl")
c5c42f0a 192 (version "7.63.0")
a85cb486
SHT
193 (source (origin
194 (method url-fetch)
c10679f5 195 (uri (string-append "mirror://gnu/gnunet/" name "-" version ".tar.Z"))
a85cb486 196 (sha256
7012e2c7 197 (base32
c5c42f0a 198 "021b3pdfnqywk5q07y48kxyz7g4jjg35dk3cv0ps0x50qjr4ix33"))))
a85cb486 199 (build-system gnu-build-system)
50e9f81a 200 (outputs '("out"
c5c42f0a 201 "doc")) ; 1.7 MiB of man3 pages
fd67e3a2 202 (inputs `(("gnutls" ,gnutls/dane)
a85cb486
SHT
203 ("libidn" ,libidn)
204 ("zlib" ,zlib)))
205 (native-inputs
a35e0033 206 `(("libtool" ,libtool)
a0e43c9f 207 ("groff" ,groff)
7af52bd5
SHT
208 ("perl" ,perl)
209 ("pkg-config" ,pkg-config)
a85cb486
SHT
210 ("python" ,python-2)))
211 (arguments
bb85ce73 212 `(#:configure-flags (list "--disable-ntlm-wb")
c543b4e1 213 #:test-target "test"
214 #:parallel-tests? #f
215 #:phases
216 ;; We have to patch runtests.pl in tests/ directory
b9fe72bf 217 (modify-phases %standard-phases
50e9f81a 218 (add-after 'install 'move-man3-pages
219 (lambda* (#:key outputs #:allow-other-keys)
220 ;; Move section 3 man pages to "doc".
221 (let ((out (assoc-ref outputs "out"))
222 (doc (assoc-ref outputs "doc")))
223 (mkdir-p (string-append doc "/share/man"))
224 (rename-file (string-append out "/share/man/man3")
225 (string-append doc "/share/man/man3"))
226 #t)))
4ec08b63 227 (replace 'check
a0e43c9f 228 (lambda _
b9fe72bf
EF
229 (substitute* "tests/runtests.pl"
230 (("/bin/sh") (which "sh")))
4ec08b63 231
232 ;; Make test output more verbose.
0741c3a4 233 (invoke "make" "-C" "tests" "test"))))))
a85cb486
SHT
234 (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
235 (description
236 "Gnurl is a microfork of cURL, a command line tool for transferring data
35b9e423 237with URL syntax. While cURL supports many crypto backends, libgnurl only
5f9d5905 238supports HTTP, HTTPS and GnuTLS.")
166191b3
LC
239 (license (license:non-copyleft "file://COPYING"
240 "See COPYING in the distribution."))
a85cb486 241 (home-page "https://gnunet.org/gnurl")))
266b39fc
SHT
242
243(define-public gnunet
244 (package
245 (name "gnunet")
f944fbf1 246 (version "0.10.1")
266b39fc
SHT
247 (source
248 (origin
249 (method url-fetch)
250 (uri (string-append "mirror://gnu/gnunet/gnunet-" version
251 ".tar.gz"))
6adda006 252 (sha256
253 (base32
254 "04wxzm3wkgqbn42b8ksr4cx6m5cckyig5cls1adh0nwdczwvnp7n"))))
266b39fc
SHT
255 (build-system gnu-build-system)
256 (inputs
05e8a0b0
AE
257 `(("glpk" ,glpk)
258 ("gnurl" ,gnurl)
1eb6bbd8
RW
259 ("gstreamer" ,gstreamer)
260 ("gst-plugins-base" ,gst-plugins-base)
6a5f7af6 261 ("gnutls" ,gnutls/dane)
266b39fc
SHT
262 ("libextractor" ,libextractor)
263 ("libgcrypt" ,libgcrypt)
266b39fc 264 ("libidn" ,libidn)
6adda006 265 ("libmicrohttpd" ,libmicrohttpd) ; hostlist, pt, contrib, and more
3246cc91 266 ("libltdl" ,libltdl)
6adda006 267 ("libunistring" ,libunistring) ; fs and more
268 ("openssl" ,openssl) ; transport, certificate creation, contribs
269 ("opus" ,opus) ; gnunet-conversation
270 ("pulseaudio" ,pulseaudio) ; conversation
271 ("sqlite" ,sqlite) ; sqlite bindings, *store
272 ("zlib" ,zlib)
273 ("perl" ,perl) ; doxygen and more
274 ("jansson" ,jansson) ; identity, taler (external), gnunet-json, gns
275 ("nss" ,nss) ; gns
276 ("gmp" ,gmp) ; util
277 ("bluez" ,bluez) ; gnunet-transport
278 ("glib" ,glib)
279 ("libogg" ,libogg) ; gnunet-conversation
280 ("python-2" ,python-2))) ; tests, gnunet-qr
266b39fc 281 (native-inputs
6adda006 282 `(("pkg-config" ,pkg-config)))
266b39fc 283 (arguments
972f4e50
SB
284 '(#:configure-flags
285 (list (string-append "--with-nssdir=" %output "/lib"))
286 #:parallel-tests? #f
f944fbf1
AE
287 ;; test_gnunet_service_arm fails; reported upstream
288 #:tests? #f
289 #:phases
90d8ef6b 290 (modify-phases %standard-phases
05e8a0b0 291 ;; swap check and install phases and set paths to installed binaries
90d8ef6b
EF
292 (add-before 'check 'set-path-for-check
293 (lambda* (#:key outputs #:allow-other-keys)
294 (let ((out (assoc-ref outputs "out")))
295 (setenv "GNUNET_PREFIX" (string-append out "/lib"))
296 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")))
297 #t))
298 (add-after 'install 'check
299 (assoc-ref %standard-phases 'check))
300 (delete 'check))))
574e86f9 301 (synopsis "Secure, decentralized, peer-to-peer networking framework")
266b39fc 302 (description
a3947cb1
LC
303 "GNUnet is a framework for secure peer-to-peer networking. The
304high-level goal is to provide a strong foundation of free software for a
305global, distributed network that provides security and privacy. GNUnet in
306that sense aims to replace the current internet protocol stack. Along with
307an application for secure publication of files, it has grown to include all
308kinds of basic applications for the foundation of a GNU internet.")
266b39fc
SHT
309 (license license:gpl3+)
310 (home-page "https://gnunet.org/")))
59698c2c
LC
311
312(define-public guile-gnunet ;GSoC 2015!
5651e74c
AV
313 (let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")
314 (revision "1"))
59698c2c
LC
315 (package
316 (name "guile-gnunet")
5651e74c 317 (version (git-version "0.0" revision commit))
59698c2c
LC
318 (source (origin
319 (method git-fetch)
320 (uri (git-reference
5f13bf09 321 (url "https://git.savannah.gnu.org/git/guix/gnunet.git/")
59698c2c 322 (commit commit)))
5651e74c 323 (file-name (git-file-name name version))
59698c2c
LC
324 (sha256
325 (base32
5651e74c 326 "0nqc18jh9j30y4l6yh6j35byfg6qalq7yr3frv9rk10qa041c2sv"))))
59698c2c 327 (build-system gnu-build-system)
59698c2c 328 (native-inputs `(("pkg-config" ,pkg-config)
464f5447 329 ("autoconf" ,autoconf-wrapper)
59698c2c
LC
330 ("automake" ,automake)))
331 (inputs `(("guile" ,guile-2.0)
332 ("gnunet" ,gnunet)))
333 (synopsis "Guile bindings for GNUnet services")
334 (description
335 "This package provides Guile bindings to the client libraries of various
336GNUnet services, including the @dfn{identity} and @dfn{file sharing}
337services.")
cc04b099 338 (home-page "https://gnu.org/software/guix")
59698c2c 339 (license license:gpl3+))))
3ccdd430 340
341;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
342;; does not seem to be fully functional. This has been reported upstream:
343;; http://lists.gnu.org/archive/html/gnunet-developers/2016-02/msg00004.html
344(define-public gnunet-gtk
345 (package (inherit gnunet)
346 (name "gnunet-gtk")
347 (version (package-version gnunet))
348 (source (origin
349 (method url-fetch)
350 (uri (string-append "mirror://gnu/gnunet/gnunet-gtk-"
351 version ".tar.gz"))
352 (sha256
353 (base32
354 "1p38k1s6a2fmcfc9a7cf1zrdycm9h06kqdyand4s3k500nj6mb4g"))))
355 (arguments
356 `(#:configure-flags
d8bc4729 357 (list "--with-libunique"
9b12bc70 358 "--with-qrencode"
359 (string-append "--with-gnunet="
360 (assoc-ref %build-inputs "gnunet")))))
3ccdd430 361 (inputs
362 `(("gnunet" ,gnunet)
363 ("libgcrypt" ,libgcrypt)
364 ("gtk+" ,gtk+)
365 ("libextractor" ,libextractor)
366 ("glade3" ,glade3)
d8bc4729 367 ("qrencode" ,qrencode)
368 ("libunique" ,libunique)))
3ccdd430 369 (native-inputs
370 `(("pkg-config" ,pkg-config)
371 ("libglade" ,libglade)))
372 (synopsis "Graphical front-end tools for GNUnet")))