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.scm422
1 files changed, 422 insertions, 0 deletions
diff --git a/contrib/packages/guix/packages/gnunet/packages/gnunet.scm b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm
new file mode 100644
index 000000000..5c5a33759
--- /dev/null
+++ b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm
@@ -0,0 +1,422 @@
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 bison)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages databases)
32 #:use-module (gnu packages gettext)
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages gnome)
35 #:use-module (gnu packages gnunet)
36 #:use-module (gnu packages gnupg)
37 #:use-module (gnu packages gnuzilla)
38 #:use-module (gnu packages gstreamer)
39 #:use-module (gnu packages gtk)
40 #:use-module (gnu packages libidn)
41 #:use-module (gnu packages libunistring)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages man)
44 #:use-module (gnu packages image-viewers)
45 #:use-module (gnu packages maths)
46 #:use-module (gnu packages multiprecision)
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages pcre)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages pulseaudio)
52 #:use-module (gnu packages python)
53 #:use-module (gnu packages tls)
54 #:use-module (gnu packages upnp)
55 #:use-module (gnu packages web)
56 #:use-module (gnu packages xiph))
57
58;; TODO: Use HEAD without checking sum of it.
59;; Explanation for name scheme: UNIXPATH is capped at 108 characters,
60;; this causes lots of tests to fail.
61(define-public gnunetg
62 (let* ((commit "6bcc73a1cbb1d4a609884762eab1b6de761ad1d9")
63 (revision "22"))
64 (package
65 (inherit gnunet)
66 (name "gnunetg")
67 (version (string-append "0.10.1" revision
68 (string-take commit 7)))
69 (source
70 (origin
71 (method git-fetch)
72 (uri (git-reference
73 (url "https://gnunet.org/git/gnunet.git")
74 (commit commit)))
75 (file-name (string-append name "-" version "-checkout"))
76 (sha256
77 (base32
78 "13sl8fcr136wfkqay57spfpcbgb935gwpkrk9dv1bhfnzrhy4ibi"))))
79 (build-system gnu-build-system)
80 (inputs
81 `(("glpk" ,glpk)
82 ("gnurl" ,gnurl)
83 ("gstreamer" ,gstreamer)
84 ("gst-plugins-base" ,gst-plugins-base)
85 ("gnutls" ,gnutls)
86 ("libextractor" ,libextractor)
87 ("libgcrypt" ,libgcrypt)
88 ("libidn" ,libidn)
89 ("libmicrohttpd" ,libmicrohttpd)
90 ("libltdl" ,libltdl)
91 ("libunistring" ,libunistring)
92 ("openssl" ,openssl)
93 ("opus" ,opus)
94 ("pulseaudio" ,pulseaudio)
95 ("sqlite" ,sqlite)
96 ("zlib" ,zlib)
97 ("perl" ,perl)
98 ("python" ,python-2) ; tests and gnunet-qr
99 ("jansson" ,jansson)
100 ("ncurses" ,ncurses)
101 ("nss" ,nss)
102 ("gmp" ,gmp)
103 ("miniupnpc" ,miniupnpc)
104 ("bluez" ,bluez) ; for optional bluetooth feature
105 ("glib" ,glib)
106 ;; ("texlive-minimal" ,texlive-minimal) ; optional.
107 ("libogg" ,libogg)))
108 (native-inputs
109 `(("pkg-config" ,pkg-config)
110 ("autoconf" ,autoconf)
111 ("automake" ,automake)
112 ("gnu-gettext" ,gnu-gettext)
113 ("libtool" ,libtool)))
114 (outputs '("out" "debug"))
115 (arguments
116 `(#:configure-flags
117 (list (string-append "--with-nssdir=" %output "/lib")
118 "--enable-experimental")
119 #:parallel-tests? #f ; parallel building is not functional
120 #:tests? #f ; FAIL: test_gnunet_statistics.py
121 #:phases
122 ;; swap check and install phases and set paths to installed bin
123 (modify-phases %standard-phases
124 (add-after 'unpack 'patch-bin-sh
125 (lambda _
126 (substitute* "bootstrap"
127 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
128 (for-each (lambda (f) (chmod f #o755))
129 (find-files "po" ""))
130 #t))
131 (add-after 'patch-bin-sh 'bootstrap
132 (lambda _
133 (zero? (system* "sh" "bootstrap"))))
134 ;; DISABLED until failing testcases are fixed.
135 ;; this test fails in our environment, disable it:
136 ;; XXX: specify which ones fail.
137 ;; (add-after 'patch-bin-sh 'disable-test_quota_compliance_tcp_asymmetric
138 ;; (lambda _
139 ;; (substitute* '("src/transport/Makefile.am")
140 ;; (("test_quota_compliance_tcp_asymmetric") ""))))
141 ;; (("test_quota_compliance_http_asymmetric") "")
142 ;; (("test_quota_compliance_https_asymmetric") "")
143 ;; (("test_quota_compliance_unix") "")
144 ;; (("test_quota_compliance_unix_asymmetric") ""))))
145 ;; check is between build and install, fix this to:
146 ;; build - install - check, else the test suite fails.
147 (delete 'check)))))))
148 ;; (add-after 'install 'set-path-for-check
149 ;; (lambda* (#:key outputs #:allow-other-keys)
150 ;; (let* ((out (assoc-ref outputs "out"))
151 ;; (bin (string-append out "/bin"))
152 ;; (lib (string-append out "/lib")))
153 ;; (setenv "GNUNET_PREFIX" lib)
154 ;; (setenv "PATH" (string-append (getenv "PATH") ":" bin))
155 ;; ;; XXX: https://gnunet.org/bugs/view.php?id=4619#c11061
156 ;; ;; Enable core dump before the tests.
157 ;; ;; XXX: HOW??? ulimit -c unlimited
158 ;; (zero? (system* "make" "check"))))))))
159
160(define-public gnunetgpg
161 (package
162 (inherit gnunetg)
163 (name "gnunetgpg")
164 (inputs
165 `(("postgresql" ,postgresql)
166 ,@(package-inputs gnunetg)))
167 (synopsis "gnunet, variant with postgres")))
168
169(define-public gnunetgf
170 (package
171 (inherit gnunetg)
172 (name "gnunetgf")
173 (inputs
174 `(("postgresql" ,postgresql)
175 ("mysql" ,mysql)
176 ,@(package-inputs gnunetg)))
177 (arguments
178 `(#:configure-flags
179 (list (string-append "--with-nssdir=" %output "/lib")
180 "--enable-gcc-hardening"
181 "--enable-linker-hardening"
182
183 "--enable-poisoning"
184 "--enable-sanitizer"
185 "--enable-experimental"
186 "--enable-logging=verbose"
187 "CFLAGS=-ggdb -O0")
188 #:parallel-tests? #f ; parallel building is not supported.
189 ;;#:tests? #f ; fail: test_gnunet_statistics.py
190 #:phases
191 ;; swap check and install phases and set paths to installed bin
192 (modify-phases %standard-phases
193 (add-after 'unpack 'patch-bin-sh
194 (lambda _
195 (substitute* "bootstrap"
196 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
197 (for-each (lambda (f) (chmod f #o755))
198 (find-files "po" ""))
199 #t))
200 (add-after 'patch-bin-sh 'bootstrap
201 (lambda _
202 (zero? (system* "sh" "bootstrap"))))
203 (delete 'check))))
204 (synopsis "gnunet, full git build without tests")))
205
206;; A package to run the test suite.
207(define-public gnunetgft
208 (package
209 (inherit gnunetg)
210 (name "gnunetgft")
211 (arguments
212 `(#:configure-flags
213 (list (string-append "--with-nssdir=" %output "/lib")
214 "--enable-gcc-hardening"
215 "--enable-linker-hardening"
216
217 ;;"--enable-poisoning"
218 ;;"--enable-sanitizer"
219 "--enable-experimental"
220 "--enable-logging=verbose"
221 "CFLAGS=-ggdb -O0")
222 ;; #:parallel-tests? #f ; parallel building seems to fail
223 ;;#:tests? #f ; fail: test_gnunet_statistics.py
224 #:phases
225 ;; swap check and install phases and set paths to installed bin
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch-bin-sh
228 (lambda _
229 (substitute* "bootstrap"
230 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
231 (for-each (lambda (f) (chmod f #o755))
232 (find-files "po" ""))
233 #t))
234 (add-after 'patch-bin-sh 'bootstrap
235 (lambda _
236 (zero? (system* "sh" "bootstrap"))))
237 (delete 'check)
238 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
239 (add-after 'install 'set-path-for-check
240 (lambda* (#:key outputs #:allow-other-keys)
241 (let* ((out (assoc-ref outputs "out"))
242 (bin (string-append out "/bin"))
243 (lib (string-append out "/lib")))
244 (setenv "GNUNET_PREFIX" lib)
245 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
246 (zero? (system* "make" "check"))))))))
247 (synopsis "gnunet, full git with tests enabled with parallel tests")))
248
249;; ... and one package to test the package with "parallel-tests? #f"
250(define-public gnunetgftn
251 (package
252 (inherit gnunetg)
253 (name "gnunetgftn")
254 (arguments
255 `(#:configure-flags
256 (list (string-append "--with-nssdir=" %output "/lib")
257 "--enable-gcc-hardening"
258 "--enable-linker-hardening"
259
260 "--enable-poisoning"
261 "--enable-sanitizer"
262 "--enable-experimental"
263 "--enable-logging=verbose"
264 "CFLAGS=-ggdb"); -O0")
265 #:parallel-tests? #f ; parallel building seems to fail
266 ;;#:tests? #f ; fail: test_gnunet_statistics.py
267 #:phases
268 ;; swap check and install phases and set paths to installed bin
269 (modify-phases %standard-phases
270 (add-after 'unpack 'patch-bin-sh
271 (lambda _
272 (substitute* "bootstrap"
273 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
274 (for-each (lambda (f) (chmod f #o755))
275 (find-files "po" ""))
276 #t))
277 (add-after 'patch-bin-sh 'bootstrap
278 (lambda _
279 (zero? (system* "sh" "bootstrap"))))
280 (delete 'check)
281 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
282 (add-after 'install 'set-path-for-check
283 (lambda* (#:key outputs #:allow-other-keys)
284 (let* ((out (assoc-ref outputs "out"))
285 (bin (string-append out "/bin"))
286 (lib (string-append out "/lib")))
287 (setenv "GNUNET_PREFIX" lib)
288 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
289 (zero? (system* "make" "check"))))))))))
290
291(define-public gnunet-gtkg
292 (let* ((commit "087f8e166ee6d1fc59a6bd5d05f656528761ede7")
293 (revision "5"))
294 (package
295 (inherit gnunetgf)
296 (name "gnunet-gtkg")
297 (version (package-version gnunetgf))
298 (source
299 (origin
300 (method git-fetch)
301 (uri (git-reference
302 (url "https://gnunet.org/git/gnunet-gtk.git")
303 (commit commit)))
304 (file-name (string-append name "-" version "-checkout"))
305 (sha256
306 (base32
307 "1k03d8l0yz4fpliy5bg5s7qkpidzd6ryr4cd63wgmd227p32i87q"))))
308 (arguments
309 `(#:configure-flags
310 (list "--with-libunique"
311 "--with-qrencode"
312 (string-append "--with-gnunet="
313 (assoc-ref %build-inputs "gnunetgf")))
314 #:phases
315 (modify-phases %standard-phases
316 (add-before 'configure 'bootstrap
317 (lambda _
318 (zero? (system* "autoreconf" "-vfi")))))))
319 (inputs
320 `(("gnunetgf" ,gnunetgf)
321 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
322 ("gnutls" ,gnutls)
323 ("libgcrypt" ,libgcrypt)
324 ("gtk+" ,gtk+)
325 ("libextractor" ,libextractor)
326 ("glade3" ,glade3)
327 ("qrencode" ,qrencode)
328 ("libunique" ,libunique)))
329 (native-inputs
330 `(("pkg-config" ,pkg-config)
331 ("libglade" ,libglade)
332 ("autoconf" ,autoconf)
333 ("gnu-gettext" ,gnu-gettext)
334 ("automake" ,automake)
335 ("libtool" ,libtool)))
336 (synopsis "Graphical front-end tools for GNUnet")
337 (home-page "https://gnunet.org"))))
338
339;; fuse, pointing to the tests disabled version of gnunet-git
340(define-public gnunet-fuse-git
341 (let* ((commit "3503aeff6db6b39b85e13f9483d46d49ce9cec55")
342 (revision "3"))
343 (package
344 (inherit gnunetg)
345 ;;(inherit gnunet)
346 (name "gnunet-fuse-git")
347 (version (package-version gnunetgf))
348 ;;(version (package-version gnunet))
349 (source
350 (origin
351 (method git-fetch)
352 (uri (git-reference
353 (url "https://gnunet.org/git/gnunet-fuse.git")
354 (commit commit)))
355 (file-name (string-append name "-" version "-checkout"))
356 (sha256
357 (base32
358 "0sxzppanw2nrjqv1vnyj2jx3ja6gqrg0ibkl5n1fr265cqk5hgc5"))))
359 (arguments
360 `(#:configure-flags
361 (list "--with-qrencode"
362 (string-append "--with-gnunet="
363 (assoc-ref %build-inputs "gnunetgf"))) ;"gnunet")))
364 #:phases
365 (modify-phases %standard-phases
366 (add-after 'unpack 'fix-gnunet-include-path
367 (lambda _
368 (substitute* "configure.ac"
369 (("gnunet/gnunet_util_lib.h")
370 "${lookin}/include/gnunet/gnunet_util_lib.h"))
371 #t))
372 (add-before 'configure 'bootstrap
373 (lambda _
374 (zero? (system* "autoreconf" "-vfi")))))))
375 (inputs
376 `(("gnunetgf" ,gnunetgf)))
377 ;;`(("gnunet" ,gnunet)))
378 (native-inputs
379 `(("pkg-config" ,pkg-config)
380 ("fuse" ,fuse)
381 ("autoconf" ,autoconf)
382 ("gnu-gettext" ,gnu-gettext)
383 ("automake" ,automake)
384 ("libtool" ,libtool)))
385 (synopsis "FUSE for GNUnet")
386 (home-page "https://gnunet.org"))))
387
388;; A package to run the test suite (with libressl)
389(define-public gnunetgftl
390 (package
391 (inherit gnunetg)
392 (name "gnunetgftl")
393 (inputs
394 `(("glpk" ,glpk)
395 ("gnurl" ,gnurl)
396 ("gstreamer" ,gstreamer)
397 ("gst-plugins-base" ,gst-plugins-base)
398 ("gnutls" ,gnutls)
399 ("libextractor" ,libextractor)
400 ("libgcrypt" ,libgcrypt)
401 ("libidn" ,libidn)
402 ("libmicrohttpd" ,libmicrohttpd)
403 ("libltdl" ,libltdl)
404 ("libunistring" ,libunistring)
405 ("libressl" ,libressl)
406 ("opus" ,opus)
407 ("pulseaudio" ,pulseaudio)
408 ("sqlite" ,sqlite)
409 ("zlib" ,zlib)
410 ("perl" ,perl)
411 ("python" ,python-2) ; tests and gnunet-qr
412 ("postgresql" ,postgresql)
413 ("jansson" ,jansson)
414 ("ncurses" ,ncurses)
415 ("nss" ,nss)
416 ("gmp" ,gmp)
417 ("miniupnpc" ,miniupnpc)
418 ("bluez" ,bluez) ; for optional bluetooth feature
419 ("glib" ,glib)
420 ;; ("texlive-minimal" ,texlive-minimal) ; optional.
421 ("libogg" ,libogg)))
422 (synopsis "gnunet git full with tests and libressl")))