aboutsummaryrefslogtreecommitdiff
path: root/contrib/packages/guix/packages/gnunet/packages/gnunet.scm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/packages/guix/packages/gnunet/packages/gnunet.scm')
-rw-r--r--contrib/packages/guix/packages/gnunet/packages/gnunet.scm519
1 files changed, 0 insertions, 519 deletions
diff --git a/contrib/packages/guix/packages/gnunet/packages/gnunet.scm b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm
deleted file mode 100644
index be529ec1d..000000000
--- a/contrib/packages/guix/packages/gnunet/packages/gnunet.scm
+++ /dev/null
@@ -1,519 +0,0 @@
1;;; This file is part of GNUnet.
2;;; Copyright (C) 2016, 2017 GNUnet e.V.
3;;;
4;;; GNUnet is free software; you can redistribute it and/or modify
5;;; it under the terms of the GNU General Public License as published
6;;; by the Free Software Foundation; either version 3, or (at your
7;;; option) any later version.
8;;;
9;;; GNUnet is distributed in the hope that it will be useful, but
10;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12;;; General Public License for more details.
13;;;
14;;; You should have received a copy of the GNU General Public License
15;;; along with GNUnet; see the file COPYING. If not, write to the
16;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17;;; Boston, MA 02110-1301, USA.
18
19(define-module (gnunet packages gnunet)
20 #:use-module (guix build-system gnu)
21 #:use-module (guix download)
22 #:use-module (guix git-download)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages admin)
27 #:use-module (gnu packages aidc)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages databases)
33 #:use-module (gnu packages gettext)
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages gnome)
36 #:use-module (gnu packages gnunet)
37 #:use-module (gnu packages gnupg)
38 #:use-module (gnu packages gnuzilla)
39 #:use-module (gnu packages gstreamer)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages libidn)
42 #:use-module (gnu packages libunistring)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages man)
45 #:use-module (gnu packages image-viewers)
46 #:use-module (gnu packages maths)
47 #:use-module (gnu packages multiprecision)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages pcre)
50 #:use-module (gnu packages perl)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages pulseaudio)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages tls)
55 #:use-module (gnu packages texinfo)
56 #:use-module (gnu packages tex)
57 #:use-module (gnu packages upnp)
58 #:use-module (gnu packages web)
59 #:use-module (gnu packages xiph))
60
61;; TODO: Use HEAD without checking sum of it.
62;; Explanation for name scheme: UNIXPATH is capped at 108 characters,
63;; this causes lots of tests to fail.
64;; FIXME: make this file MUCH shorter.
65(define-public gnunetg
66 (let* ((commit "3c3090717610ea787fdd3562901329254a6af0d6")
67 (revision "32"))
68 (package
69 (inherit gnunet)
70 (name "gnunetg")
71 (version (string-append "0.10.1" "-" revision
72 "." (string-take commit 7)))
73 (source
74 (origin
75 (method git-fetch)
76 (uri (git-reference
77 (url "https://gnunet.org/git/gnunet.git")
78 (commit commit)))
79 (file-name (string-append name "-" version "-checkout"))
80 (sha256
81 (base32
82 "0g0x1r833jkssfd2sndy37509dqf9f8myjvg7mnadwc1irp393bl"))))
83 (build-system gnu-build-system)
84 (inputs
85 `(("glpk" ,glpk)
86 ("gnurl" ,gnurl)
87 ("gstreamer" ,gstreamer)
88 ("gst-plugins-base" ,gst-plugins-base)
89 ("gnutls" ,gnutls)
90 ("libextractor" ,libextractor)
91 ("libgcrypt" ,libgcrypt)
92 ("libidn" ,libidn)
93 ("libmicrohttpd" ,libmicrohttpd)
94 ("libltdl" ,libltdl)
95 ("libunistring" ,libunistring)
96 ("openssl" ,openssl)
97 ("opus" ,opus)
98 ("pulseaudio" ,pulseaudio)
99 ("sqlite" ,sqlite)
100 ("zlib" ,zlib)
101 ("perl" ,perl)
102 ("python" ,python-2) ; tests and gnunet-qr
103 ("jansson" ,jansson)
104 ("ncurses" ,ncurses)
105 ("nss" ,nss)
106 ("gmp" ,gmp)
107 ("miniupnpc" ,miniupnpc)
108 ("bluez" ,bluez) ; for optional bluetooth feature
109 ("glib" ,glib)
110 ;; ("texlive-minimal" ,texlive-minimal) ; optional.
111 ("libogg" ,libogg)))
112 (native-inputs
113 `(("pkg-config" ,pkg-config)
114 ("autoconf" ,autoconf)
115 ("automake" ,automake)
116 ("gnu-gettext" ,gnu-gettext)
117 ("which" ,which)
118 ("texinfo" ,texinfo)
119 ("libtool" ,libtool)))
120 (outputs '("out" "debug"))
121 (arguments
122 `(#:configure-flags
123 (list (string-append "--with-nssdir=" %output "/lib")
124 "--enable-experimental")
125 #:parallel-tests? #f ; parallel building is not functional
126 #:tests? #f ; FAIL: test_gnunet_statistics.py
127 #:phases
128 ;; swap check and install phases and set paths to installed bin
129 (modify-phases %standard-phases
130 (add-after 'unpack 'patch-bin-sh
131 (lambda _
132 (substitute* "bootstrap"
133 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
134 (for-each (lambda (f) (chmod f #o755))
135 (find-files "po" ""))
136 #t))
137 (add-after 'patch-bin-sh 'bootstrap
138 (lambda _
139 (zero? (system* "sh" "bootstrap"))))
140 ;; DISABLED until failing testcases are fixed.
141 ;; this test fails in our environment, disable it:
142 ;; XXX: specify which ones fail.
143 ;; (add-after 'patch-bin-sh 'disable-test_quota_compliance_tcp_asymmetric
144 ;; (lambda _
145 ;; (substitute* '("src/transport/Makefile.am")
146 ;; (("test_quota_compliance_tcp_asymmetric") ""))))
147 ;; (("test_quota_compliance_http_asymmetric") "")
148 ;; (("test_quota_compliance_https_asymmetric") "")
149 ;; (("test_quota_compliance_unix") "")
150 ;; (("test_quota_compliance_unix_asymmetric") ""))))
151 ;; check is between build and install, fix this to:
152 ;; build - install - check, else the test suite fails.
153 (delete 'check)))))))
154 ;; (add-after 'install 'set-path-for-check
155 ;; (lambda* (#:key outputs #:allow-other-keys)
156 ;; (let* ((out (assoc-ref outputs "out"))
157 ;; (bin (string-append out "/bin"))
158 ;; (lib (string-append out "/lib")))
159 ;; (setenv "GNUNET_PREFIX" lib)
160 ;; (setenv "PATH" (string-append (getenv "PATH") ":" bin))
161 ;; ;; XXX: https://gnunet.org/bugs/view.php?id=4619#c11061
162 ;; ;; Enable core dump before the tests.
163 ;; ;; XXX: HOW??? ulimit -c unlimited
164 ;; (zero? (system* "make" "check"))))))))
165
166(define-public gnunet-doc
167 (package
168 (name "gnunet-doc")
169 (version (package-version gnunetg))
170 (source (package-source gnunetg))
171 (build-system gnu-build-system)
172 ;; FIXME: Introduce DOCS_ONLY option for configure script.
173 ;; This should prevent the checks for all required software.
174 (inputs
175 `(("glpk" ,glpk)
176 ("gnurl" ,gnurl)
177 ("gstreamer" ,gstreamer)
178 ("gst-plugins-base" ,gst-plugins-base)
179 ("gnutls" ,gnutls)
180 ("libextractor" ,libextractor)
181 ("libgcrypt" ,libgcrypt)
182 ("libidn" ,libidn)
183 ("libmicrohttpd" ,libmicrohttpd)
184 ("libltdl" ,libltdl)
185 ("libunistring" ,libunistring)
186 ("openssl" ,openssl)
187 ("opus" ,opus)
188 ("pulseaudio" ,pulseaudio)
189 ("sqlite" ,sqlite)
190 ("zlib" ,zlib)
191 ("perl" ,perl)
192 ("python" ,python-2) ; tests and gnunet-qr
193 ("jansson" ,jansson)
194 ("ncurses" ,ncurses)
195 ("nss" ,nss)
196 ("gmp" ,gmp)
197 ("miniupnpc" ,miniupnpc)
198 ("bluez" ,bluez) ; for optional bluetooth feature
199 ("glib" ,glib)
200 ("texlive" ,texlive) ;TODO: Use a minimal subset.
201 ("libogg" ,libogg)))
202 (native-inputs
203 `(("pkg-config" ,pkg-config)
204 ("autoconf" ,autoconf)
205 ("which" ,which)
206 ("automake" ,automake)
207 ("gnu-gettext" ,gnu-gettext)
208 ("texinfo" ,texinfo)
209 ("libtool" ,libtool)))
210 (arguments
211 `(#:tests? #f ;Don't run tests
212 #:phases
213 (modify-phases %standard-phases
214 (add-after 'unpack 'patch-bin-sh
215 (lambda _
216 (substitute* "bootstrap"
217 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
218 (for-each (lambda (f) (chmod f #o755))
219 (find-files "po" ""))
220 #t))
221 (add-after 'patch-bin-sh 'bootstrap
222 (lambda _
223 (zero? (system* "sh" "bootstrap"))))
224 (replace 'build
225 (lambda _
226 (chdir "doc")
227 (zero? (system* "make" "doc-all-give-me-the-noise"))))
228 (replace 'install
229 (lambda* (#:key outputs #:allow-other-keys)
230 (let* ((out (assoc-ref outputs "out"))
231 (doc (string-append out "/share/doc/gnunet")))
232 (mkdir-p doc)
233 (mkdir-p (string-append doc "/gnunet"))
234 (install-file "gnunet.pdf" doc)
235 (install-file "gnunet.info" doc)
236 (copy-recursively "gnunet"
237 (string-append doc
238 "/gnunet"))
239 (install-file "gnunet-c-tutorial.pdf" doc)
240 (install-file "gnunet-c-tutorial.info" doc)
241 (copy-recursively "gnunet-c-tutorial"
242 (string-append doc
243 "/gnunet-c-tutorial")))
244 #t)))))
245 (synopsis "GNUnet documentation")
246 (description
247 "Gnunet-doc builds the documentation of GNUnet.")
248 (home-page "https://gnunet.org")
249 (license (package-license gnunet))))
250
251(define-public gnunetgpg
252 (package
253 (inherit gnunetg)
254 (name "gnunetgpg")
255 (inputs
256 `(("postgresql" ,postgresql)
257 ,@(package-inputs gnunetg)))
258 (synopsis "gnunet, variant with postgres")))
259
260(define-public gnunetgf
261 (package
262 (inherit gnunetg)
263 (name "gnunetgf")
264 (inputs
265 `(("postgresql" ,postgresql)
266 ("mysql" ,mysql)
267 ,@(package-inputs gnunetg)))
268 (arguments
269 `(#:configure-flags
270 (list (string-append "--with-nssdir=" %output "/lib")
271 "--enable-gcc-hardening"
272 "--enable-linker-hardening"
273
274 "--enable-poisoning"
275 "--enable-sanitizer"
276 "--enable-experimental"
277 "--enable-logging=verbose"
278 "CFLAGS=-ggdb -O0")
279 #:parallel-tests? #f ; parallel building is not supported.
280 ;;#:tests? #f ; fail: test_gnunet_statistics.py
281 #:phases
282 ;; swap check and install phases and set paths to installed bin
283 (modify-phases %standard-phases
284 (add-after 'unpack 'patch-bin-sh
285 (lambda _
286 (substitute* "bootstrap"
287 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
288 (for-each (lambda (f) (chmod f #o755))
289 (find-files "po" ""))
290 #t))
291 (add-after 'patch-bin-sh 'bootstrap
292 (lambda _
293 (zero? (system* "sh" "bootstrap"))))
294 (delete 'check))))
295 (synopsis "gnunet, full git build without tests")))
296
297;; A package to run the test suite.
298(define-public gnunetgft
299 (package
300 (inherit gnunetg)
301 (name "gnunetgft")
302 (arguments
303 `(#:configure-flags
304 (list (string-append "--with-nssdir=" %output "/lib")
305 "--enable-gcc-hardening"
306 "--enable-linker-hardening"
307
308 ;;"--enable-poisoning"
309 ;;"--enable-sanitizer"
310 "--enable-experimental"
311 "--enable-logging=verbose"
312 "CFLAGS=-ggdb -O0")
313 ;; #:parallel-tests? #f ; parallel building seems to fail
314 ;;#:tests? #f ; fail: test_gnunet_statistics.py
315 #:phases
316 ;; swap check and install phases and set paths to installed bin
317 (modify-phases %standard-phases
318 (add-after 'unpack 'patch-bin-sh
319 (lambda _
320 (substitute* "bootstrap"
321 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
322 (for-each (lambda (f) (chmod f #o755))
323 (find-files "po" ""))
324 #t))
325 (add-after 'patch-bin-sh 'bootstrap
326 (lambda _
327 (zero? (system* "sh" "bootstrap"))))
328 (delete 'check)
329 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
330 (add-after 'install 'set-path-for-check
331 (lambda* (#:key outputs #:allow-other-keys)
332 (let* ((out (assoc-ref outputs "out"))
333 (bin (string-append out "/bin"))
334 (lib (string-append out "/lib")))
335 (setenv "GNUNET_PREFIX" lib)
336 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
337 (zero? (system* "make" "check"))))))))
338 (synopsis "gnunet, full git with tests enabled with parallel tests")))
339
340(define-public gnunetg-test
341 (package
342 (inherit gnunetg)
343 (name "gnunetg-test")
344 (arguments
345 `(#:configure-flags
346 (list (string-append "--with-nssdir=" %output "/lib")
347 "--enable-gcc-hardening"
348 "--enable-linker-hardening"
349
350 ;;"--enable-poisoning"
351 ;;"--enable-sanitizer"
352 "--enable-logging=verbose"
353 "CFLAGS=-ggdb -O0")
354 ;; #:parallel-tests? #f ; parallel building seems to fail
355 ;;#:tests? #f ; fail: test_gnunet_statistics.py
356 #:phases
357 ;; swap check and install phases and set paths to installed bin
358 (modify-phases %standard-phases
359 (add-after 'unpack 'patch-bin-sh
360 (lambda _
361 (substitute* "bootstrap"
362 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
363 (for-each (lambda (f) (chmod f #o755))
364 (find-files "po" ""))
365 #t))
366 (add-after 'patch-bin-sh 'bootstrap
367 (lambda _
368 (zero? (system* "sh" "bootstrap"))))
369 (delete 'check)
370 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
371 (add-after 'install 'set-path-for-check
372 (lambda* (#:key outputs #:allow-other-keys)
373 (let* ((out (assoc-ref outputs "out"))
374 (bin (string-append out "/bin"))
375 (lib (string-append out "/lib")))
376 (setenv "GNUNET_PREFIX" lib)
377 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
378 (zero? (system* "make" "check"))))))))
379 (synopsis "gnunet, full git with tests enabled without experimental")))
380
381;; ... and one package to test the package with "parallel-tests? #f"
382(define-public gnunetgftn
383 (package
384 (inherit gnunetg)
385 (name "gnunetgftn")
386 (arguments
387 `(#:configure-flags
388 (list (string-append "--with-nssdir=" %output "/lib")
389 "--enable-gcc-hardening"
390 "--enable-linker-hardening"
391
392 "--enable-poisoning"
393 "--enable-sanitizer"
394 "--enable-experimental"
395 "--enable-logging=verbose"
396 "CFLAGS=-ggdb"); -O0")
397 #:parallel-tests? #f ; parallel building seems to fail
398 ;;#:tests? #f ; fail: test_gnunet_statistics.py
399 #:phases
400 ;; swap check and install phases and set paths to installed bin
401 (modify-phases %standard-phases
402 (add-after 'unpack 'patch-bin-sh
403 (lambda _
404 (substitute* "bootstrap"
405 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
406 (for-each (lambda (f) (chmod f #o755))
407 (find-files "po" ""))
408 #t))
409 (add-after 'patch-bin-sh 'bootstrap
410 (lambda _
411 (zero? (system* "sh" "bootstrap"))))
412 (delete 'check)
413 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
414 (add-after 'install 'set-path-for-check
415 (lambda* (#:key outputs #:allow-other-keys)
416 (let* ((out (assoc-ref outputs "out"))
417 (bin (string-append out "/bin"))
418 (lib (string-append out "/lib")))
419 (setenv "GNUNET_PREFIX" lib)
420 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
421 (zero? (system* "make" "check"))))))))))
422
423(define-public gnunet-gtkg
424 (let* ((commit "087f8e166ee6d1fc59a6bd5d05f656528761ede7")
425 (revision "5"))
426 (package
427 (inherit gnunetgf)
428 (name "gnunet-gtkg")
429 (version (package-version gnunetgf))
430 (source
431 (origin
432 (method git-fetch)
433 (uri (git-reference
434 (url "https://gnunet.org/git/gnunet-gtk.git")
435 (commit commit)))
436 (file-name (string-append name "-" version "-checkout"))
437 (sha256
438 (base32
439 "1k03d8l0yz4fpliy5bg5s7qkpidzd6ryr4cd63wgmd227p32i87q"))))
440 (arguments
441 `(#:configure-flags
442 (list "--with-libunique"
443 "--with-qrencode"
444 (string-append "--with-gnunet="
445 (assoc-ref %build-inputs "gnunetgf")))
446 #:phases
447 (modify-phases %standard-phases
448 (add-before 'configure 'bootstrap
449 (lambda _
450 (zero? (system* "autoreconf" "-vfi")))))))
451 (inputs
452 `(("gnunetgf" ,gnunetgf)
453 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
454 ("gnutls" ,gnutls)
455 ("libgcrypt" ,libgcrypt)
456 ("gtk+" ,gtk+)
457 ("libextractor" ,libextractor)
458 ("glade3" ,glade3)
459 ("qrencode" ,qrencode)
460 ("libunique" ,libunique)))
461 (native-inputs
462 `(("pkg-config" ,pkg-config)
463 ("libglade" ,libglade)
464 ("autoconf" ,autoconf)
465 ("gnu-gettext" ,gnu-gettext)
466 ("texinfo" ,texinfo)
467 ("automake" ,automake)
468 ("libtool" ,libtool)))
469 (synopsis "Graphical front-end tools for GNUnet")
470 (home-page "https://gnunet.org"))))
471
472;; fuse, pointing to the tests disabled version of gnunet-git
473(define-public gnunet-fuse-git
474 (let* ((commit "3503aeff6db6b39b85e13f9483d46d49ce9cec55")
475 (revision "3"))
476 (package
477 (inherit gnunetg)
478 ;;(inherit gnunet)
479 (name "gnunet-fuse-git")
480 (version (package-version gnunetgf))
481 ;;(version (package-version gnunet))
482 (source
483 (origin
484 (method git-fetch)
485 (uri (git-reference
486 (url "https://gnunet.org/git/gnunet-fuse.git")
487 (commit commit)))
488 (file-name (string-append name "-" version "-checkout"))
489 (sha256
490 (base32
491 "0sxzppanw2nrjqv1vnyj2jx3ja6gqrg0ibkl5n1fr265cqk5hgc5"))))
492 (arguments
493 `(#:configure-flags
494 (list "--with-qrencode"
495 (string-append "--with-gnunet="
496 (assoc-ref %build-inputs "gnunetgf"))) ;"gnunet")))
497 #:phases
498 (modify-phases %standard-phases
499 (add-after 'unpack 'fix-gnunet-include-path
500 (lambda _
501 (substitute* "configure.ac"
502 (("gnunet/gnunet_util_lib.h")
503 "${lookin}/include/gnunet/gnunet_util_lib.h"))
504 #t))
505 (add-before 'configure 'bootstrap
506 (lambda _
507 (zero? (system* "autoreconf" "-vfi")))))))
508 (inputs
509 `(("gnunetgf" ,gnunetgf)))
510 ;;`(("gnunet" ,gnunet)))
511 (native-inputs
512 `(("pkg-config" ,pkg-config)
513 ("fuse" ,fuse)
514 ("autoconf" ,autoconf)
515 ("gnu-gettext" ,gnu-gettext)
516 ("automake" ,automake)
517 ("libtool" ,libtool)))
518 (synopsis "FUSE for GNUnet")
519 (home-page "https://gnunet.org"))))