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 <ngillmann@runbox.com>
22 ;;; Parts borrowed here from pubstrate:
23 ;;; Pubstrate is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 ;;; General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with Pubstrate. If not, see <http://www.gnu.org/licenses/>.
31 ;;; Parts borrowed here from guile-sdl2:
32 ;;; Guile-sdl2 is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35 ;;; General Public License for more details.
37 ;;; You should have received a copy of the GNU Lesser General Public
38 ;;; License along with guile-sdl2. If not, see
39 ;;; <http://www.gnu.org/licenses/>.
41 ;; Guix package for GNUnet development
45 ;; To build and install the package in the user environment, use:
47 ;; .. to be documented
51 ;; Precondition for using this file is that you run Guix and have a
52 ;; development setup for this setup, which involves a version of Guile in
55 ;; Simply run "guix build -f guix-env.scm"
57 ;; We'd like to provide advanced functions such as guix environment specific
58 ;; gnunet-svn package, but this is subject to tests right now.
65 (guix build-system gnu)
67 ((guix build utils) #:select (with-directory-excursion))
73 (gnu packages autotools)
74 (gnu packages compression)
77 (gnu packages gettext)
84 (gnu packages gstreamer)
85 (gnu packages gnuzilla)
89 (gnu packages libunistring)
91 (gnu packages multiprecision)
92 (gnu packages pkg-config)
94 (gnu packages pulseaudio)
96 (gnu packages databases)
102 (gnu packages backup)
103 ((guix licenses) #:prefix license:))
105 (define %source-dir (dirname (current-filename)))
108 (let* ((pipe (with-directory-excursion %source-dir
109 (open-pipe* OPEN_READ "git" "ls-files")))
110 (files (let loop ((lines '()))
111 (match (read-line pipe)
115 (loop (cons line lines))))))
116 (status (close-pipe pipe)))
118 (match (stat:type stat)
120 ((or 'regular 'symlink)
121 (any (cut string-suffix? <> file) files))
127 (version (string-append "0.10.1-" "dev"))
129 (local-file %source-dir
131 ;;#:select? git-file?)) ; XXX: FIXME.
132 (build-system gnu-build-system)
136 ("gstreamer" ,gstreamer)
137 ("gst-plugins-base" ,gst-plugins-base)
139 ("libextractor" ,libextractor)
140 ("libgcrypt" ,libgcrypt)
142 ("libmicrohttpd" ,libmicrohttpd)
144 ("libunistring" ,libunistring)
147 ("pulseaudio" ,pulseaudio)
149 ("postgresql" ,postgresql)
153 ("python" ,python) ; tests and gnunet-qr
157 ("bluez" ,bluez) ; for optional bluetooth feature
159 ;; There are currently no binary substitutes for texlive on
160 ;; hydra.gnu.org or its mirrors due to its size. Uncomment if you need it.
161 ;;("texlive-minimal" ,texlive-minimal) ; optional.
164 `(("pkg-config" ,pkg-config)
165 ("autoconf" ,autoconf)
166 ("automake" ,automake)
167 ("gnu-gettext" ,gnu-gettext)
168 ("libtool" ,libtool)))
169 ;; TODO: To make use of out:debug, which carries the symbols,
170 ;; this file needs to fixed.
171 (outputs '("out" "debug"))
174 (list (string-append "--with-nssdir=" %output "/lib")
175 ;; These appear to be "broken" on Guix, needs debugging.
176 "--enable-gcc-hardening"
177 "--enable-linker-hardening"
181 "--enable-experimental"
182 "--enable-logging=verbose"
184 ;;#:parallel-tests? #f ; parallel building seems to fail
185 ;;#:tests? #f ; fail: test_gnunet_statistics.py
187 ;; swap check and install phases and set paths to installed bin
188 (modify-phases %standard-phases
189 (add-after 'unpack 'patch-bin-sh
191 (substitute* "bootstrap"
192 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
193 (for-each (lambda (f) (chmod f #o755))
194 (find-files "po" ""))
196 (add-after 'patch-bin-sh 'bootstrap
198 (zero? (system* "sh" "bootstrap"))))
200 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
201 ;; (add-after 'install 'set-path-for-check
202 ;; (lambda* (#:key outputs #:allow-other-keys)
203 ;; (let* ((out (assoc-ref outputs "out"))
204 ;; (bin (string-append out "/bin"))
205 ;; (lib (string-append out "/lib")))
206 ;; (setenv "GNUNET_PREFIX" lib)
207 ;; (setenv "PATH" (string-append (getenv "PATH") ":" bin))
208 ;; (zero? (system* "make" "check"))))))))
209 (synopsis "Secure, decentralized, peer-to-peer networking framework")
211 "GNUnet is a framework for secure peer-to-peer networking. The
212 high-level goal is to provide a strong foundation of free software for a
213 global, distributed network that provides security and privacy. GNUnet in
214 that sense aims to replace the current internet protocol stack. Along with
215 an application for secure publication of files, it has grown to include all
216 kinds of basic applications for the foundation of a GNU internet.")
217 (license license:gpl3+)
218 (home-page "https://gnunet.org/")))