1 ;;; This file is part of GNUnet.
2 ;;; Copyright (C) 2016 GNUnet e.V.
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.
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.
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.
20 ;;; Author: N. Gillmann <ng0@runbox.com>
22 ;;; Parts borrowed here from pubstrate
24 ;;; Pubstrate is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 ;;; General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with Pubstrate. If not, see <http://www.gnu.org/licenses/>.
32 ;;; Parts borrowed here from guile-sdl2
34 ;;; Guile-sdl2 is distributed in the hope that it will be useful, but
35 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
37 ;;; General Public License for more details.
39 ;;; You should have received a copy of the GNU Lesser General Public
40 ;;; License along with guile-sdl2. If not, see
41 ;;; <http://www.gnu.org/licenses/>.
43 ;; Guix package for GNUnet development
47 ;; To build and install the package in the user environment, use:
49 ;; .. to be documented
53 ;; To build the package and add it to the gnu store, use:
55 ;; $ guix build -f guix.scm
57 (use-modules (ice-9 popen)
61 (guix build-system gnu)
63 ((guix build utils) #:select (with-directory-excursion))
69 (gnu packages autotools)
70 (gnu packages compression)
73 (gnu packages gettext)
80 (gnu packages gstreamer)
81 (gnu packages gnuzilla)
85 (gnu packages libunistring)
87 (gnu packages multiprecision)
88 (gnu packages pkg-config)
90 (gnu packages pulseaudio)
92 (gnu packages databases)
99 ((guix licenses) #:prefix license:))
102 (define %source-dir (dirname (current-filename)))
105 (let* ((pipe (with-directory-excursion %source-dir
106 (open-pipe* OPEN_READ "svn" "ls" "-R")))
107 (files (let loop ((lines '()))
108 (match (read-line pipe)
112 (loop (cons line lines))))))
113 (status (close-pipe pipe)))
115 (match (stat:type stat)
117 ((or 'regular 'symlink)
118 (any (cut string-suffix? <> file) files))
126 (local-file %source-dir
128 ;;#:select? git-file?))
129 (build-system gnu-build-system)
133 ("gstreamer" ,gstreamer)
134 ("gst-plugins-base" ,gst-plugins-base)
136 ("libextractor" ,libextractor)
137 ("libgcrypt" ,libgcrypt)
139 ("libmicrohttpd" ,libmicrohttpd)
141 ("libunistring" ,libunistring)
144 ("pulseaudio" ,pulseaudio)
148 ("python" ,python) ; tests and gnunet-qr
152 ("bluez" ,bluez) ; for optional bluetooth feature
154 ;;("texlive-minimal" ,texlive-minimal) ; optional.
157 `(("pkg-config" ,pkg-config)
158 ("autoconf" ,autoconf)
159 ("automake" ,automake)
160 ("gnu-gettext" ,gnu-gettext)
161 ("libtool" ,libtool)))
164 (list (string-append "--with-nssdir=" %output "/lib")
165 "--enable-experimental")
166 ;;"--enable-gcc-hardening"
167 ;;"--enable-linker-hardening"
168 ;;"--enable-logging=verbose")
169 ;;"--enable-poisoning")
170 ;;#:parallel-tests? #f ; parallel building seems to fail
171 ;;#:tests? #f ; fail: test_gnunet_statistics.py
173 ;; swap check and install phases and set paths to installed bin
174 (modify-phases %standard-phases
175 (add-after 'unpack 'patch-bin-sh
177 (substitute* "bootstrap"
178 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
179 (for-each (lambda (f) (chmod f #o755))
180 (find-files "po" ""))
182 (add-after 'patch-bin-sh 'bootstrap
184 (zero? (system* "sh" "bootstrap"))))
186 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
187 (add-after 'install 'set-path-for-check
188 (lambda* (#:key outputs #:allow-other-keys)
189 (let* ((out (assoc-ref outputs "out"))
190 (bin (string-append out "/bin"))
191 (lib (string-append out "/lib")))
192 (setenv "GNUNET_PREFIX" lib)
193 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
194 (zero? (system* "make" "check"))))))))
195 (synopsis "Secure, decentralized, peer-to-peer networking framework")
197 "GNUnet is a framework for secure peer-to-peer networking. The
198 high-level goal is to provide a strong foundation of free software for a
199 global, distributed network that provides security and privacy. GNUnet in
200 that sense aims to replace the current internet protocol stack. Along with
201 an application for secure publication of files, it has grown to include all
202 kinds of basic applications for the foundation of a GNU internet.")
203 (license license:gpl3+)
204 (home-page "https://gnunet.org/")))