1 ;;; This file is part of GNUnet.
2 ;;; Copyright (C) 2016, 2017, 2018 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.
24 (guix build-system gnu)
26 ((guix build utils) #:select (with-directory-excursion))
28 (guix utils) ; current-source-directory
31 (gnu packages autotools)
34 (gnu packages compression)
36 (gnu packages databases)
38 (gnu packages gettext)
43 (gnu packages gnuzilla)
45 (gnu packages gstreamer)
49 (gnu packages image-viewers)
51 (gnu packages libunistring)
54 (gnu packages multiprecision)
56 (gnu packages pkg-config)
57 (gnu packages pulseaudio)
60 (gnu packages texinfo)
67 ((guix licenses) #:prefix license:))
69 (define %source-dir (string-append (current-source-directory)
72 (define gnunet-dev-env
74 (select? (delay (or (git-predicate
75 (string-append (current-source-directory)
80 (name "gnunet-dev-env")
81 (version (string-append "0.11-" revision "." "dev-env"))
84 (string-append (getcwd))
89 ("gstreamer" ,gstreamer)
90 ("gst-plugins-base" ,gst-plugins-base)
91 ("gnutls/dane" ,gnutls/dane) ;Change to gnutls/dane once it is merged.
92 ("libextractor" ,libextractor)
93 ("libgcrypt" ,libgcrypt)
95 ("libmicrohttpd" ,libmicrohttpd)
97 ("libunistring" ,libunistring)
100 ("pulseaudio" ,pulseaudio)
102 ("postgresql" ,postgresql)
106 ("python-2" ,python-2) ; tests and gnunet-qr
111 ("bluez" ,bluez) ; for optional bluetooth feature
113 ;; ("texlive" ,texlive) ;FIXME: minimize.
114 ("texlive-tiny" ,texlive-tiny) ;; Seems to be enough for _just_ info output.
115 ("miniupnpc" ,miniupnpc)
118 `(("pkg-config" ,pkg-config)
119 ("autoconf" ,autoconf)
120 ("automake" ,automake)
121 ("gnu-gettext" ,gnu-gettext)
123 ("texinfo" ,texinfo-5) ; Debian stable: 5.2
124 ("libtool" ,libtool)))
125 (outputs '("out" "debug"))
128 (list (string-append "--with-nssdir=" %output "/lib")
129 ;;"--enable-gcc-hardening"
130 ;;"--enable-linker-hardening"
131 "--enable-logging=verbose"
134 ;; swap check and install phases and set paths to installed bin
135 (modify-phases %standard-phases
136 (add-after 'unpack 'patch-bin-sh
138 (substitute* "bootstrap"
139 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
140 (for-each (lambda (f) (chmod f #o755))
141 (find-files "po" ""))
143 (add-after 'patch-bin-sh 'bootstrap
145 (zero? (system* "sh" "bootstrap"))))
147 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
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 (zero? (system* "make" "check")))))))))))