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 (current-source-directory))
71 (define gnunet-dev-env
73 (select? (delay (or (git-predicate
74 (current-source-directory))
78 (name "gnunet-dev-env")
79 (version (string-append "0.11-" revision "." "dev-env"))
82 (string-append (getcwd))
87 ("gstreamer" ,gstreamer)
88 ("gst-plugins-base" ,gst-plugins-base)
89 ("gnutls/dane" ,gnutls/dane)
90 ("libextractor" ,libextractor)
91 ("libgcrypt" ,libgcrypt)
93 ("libmicrohttpd" ,libmicrohttpd)
95 ("libunistring" ,libunistring)
98 ("pulseaudio" ,pulseaudio)
100 ("postgresql" ,postgresql)
104 ("python-2" ,python-2) ; tests and gnunet-qr
109 ("bluez" ,bluez) ; for optional bluetooth feature
111 ;; ("texlive" ,texlive) ;FIXME: minimize.
112 ("texlive-tiny" ,texlive-tiny) ;; Seems to be enough for _just_ info output.
113 ("miniupnpc" ,miniupnpc)
116 `(("pkg-config" ,pkg-config)
117 ("autoconf" ,autoconf)
118 ("automake" ,automake)
119 ("gnu-gettext" ,gnu-gettext)
121 ("texinfo" ,texinfo-5) ; Debian stable: 5.2
122 ("libtool" ,libtool)))
123 (outputs '("out" "debug"))
126 (list (string-append "--with-nssdir=" %output "/lib")
127 ;;"--enable-gcc-hardening"
128 ;;"--enable-linker-hardening"
129 "--enable-logging=verbose"
132 ;; swap check and install phases and set paths to installed bin
133 (modify-phases %standard-phases
134 (add-after 'unpack 'patch-bin-sh
136 (substitute* "bootstrap"
137 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
138 (for-each (lambda (f) (chmod f #o755))
139 (find-files "po" ""))
141 (add-after 'patch-bin-sh 'bootstrap
143 (zero? (system* "sh" "bootstrap"))))
145 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
146 (add-after 'install 'set-path-for-check
147 (lambda* (#:key outputs #:allow-other-keys)
148 (let* ((out (assoc-ref outputs "out"))
149 (bin (string-append out "/bin"))
150 (lib (string-append out "/lib")))
151 (setenv "GNUNET_PREFIX" lib)
152 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
153 (zero? (system* "make" "check")))))))))))