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