diff options
Diffstat (limited to 'guix.scm')
-rw-r--r-- | guix.scm | 211 |
1 files changed, 0 insertions, 211 deletions
diff --git a/guix.scm b/guix.scm deleted file mode 100644 index 0070aa2cf..000000000 --- a/guix.scm +++ /dev/null | |||
@@ -1,211 +0,0 @@ | |||
1 | ;;; This file is part of GNUnet. | ||
2 | ;;; Copyright (C) 2016 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 | ;;; | ||
20 | ;;; Author: N. Gillmann <ngillmann@runbox.com> | ||
21 | ;;; | ||
22 | ;;; Parts borrowed here from pubstrate | ||
23 | ;;; | ||
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. | ||
28 | ;;; | ||
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/>. | ||
31 | ;;; | ||
32 | ;;; Parts borrowed here from guile-sdl2 | ||
33 | ;;; | ||
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. | ||
38 | ;;; | ||
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/>. | ||
42 | |||
43 | ;; Guix package for GNUnet development | ||
44 | ;; | ||
45 | ;; INSTALL | ||
46 | ;; | ||
47 | ;; To build and install the package in the user environment, use: | ||
48 | ;; | ||
49 | ;; .. to be documented | ||
50 | ;; | ||
51 | ;; BUILD ONLY | ||
52 | ;; | ||
53 | ;; To build the package and add it to the gnu store, use: | ||
54 | ;; | ||
55 | ;; $ guix build -f guix.scm | ||
56 | |||
57 | (use-modules (ice-9 popen) | ||
58 | (ice-9 match) | ||
59 | (ice-9 rdelim) | ||
60 | (guix packages) | ||
61 | (guix build-system gnu) | ||
62 | (guix gexp) | ||
63 | ((guix build utils) #:select (with-directory-excursion)) | ||
64 | (gnu packages) | ||
65 | (gnu packages base) | ||
66 | (gnu packages gnunet) | ||
67 | (gnu packages file) | ||
68 | (gnu packages aidc) | ||
69 | (gnu packages autotools) | ||
70 | (gnu packages compression) | ||
71 | (gnu packages curl) | ||
72 | (gnu packages geeqie) | ||
73 | (gnu packages gettext) | ||
74 | (gnu packages glib) | ||
75 | (gnu packages gnome) | ||
76 | (gnu packages gnupg) | ||
77 | (gnu packages groff) | ||
78 | (gnu packages gtk) | ||
79 | (gnu packages guile) | ||
80 | (gnu packages gstreamer) | ||
81 | (gnu packages gnuzilla) | ||
82 | (gnu packages libidn) | ||
83 | (gnu packages linux) | ||
84 | (gnu packages image) | ||
85 | (gnu packages libunistring) | ||
86 | (gnu packages maths) | ||
87 | (gnu packages multiprecision) | ||
88 | (gnu packages pkg-config) | ||
89 | (gnu packages perl) | ||
90 | (gnu packages pulseaudio) | ||
91 | (gnu packages python) | ||
92 | (gnu packages databases) | ||
93 | (gnu packages tls) | ||
94 | (gnu packages tex) | ||
95 | (gnu packages video) | ||
96 | (gnu packages web) | ||
97 | (gnu packages xiph) | ||
98 | (gnu packages backup) | ||
99 | ((guix licenses) #:prefix license:)) | ||
100 | |||
101 | |||
102 | (define %source-dir (dirname (current-filename))) | ||
103 | |||
104 | (define git-file? | ||
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) | ||
109 | ((? eof-object?) | ||
110 | (reverse lines)) | ||
111 | (line | ||
112 | (loop (cons line lines)))))) | ||
113 | (status (close-pipe pipe))) | ||
114 | (lambda (file stat) | ||
115 | (match (stat:type stat) | ||
116 | ('directory #t) | ||
117 | ((or 'regular 'symlink) | ||
118 | (any (cut string-suffix? <> file) files)) | ||
119 | (_ #f))))) | ||
120 | |||
121 | (define gnunet-svn | ||
122 | (package | ||
123 | (name "gnunet-svn") | ||
124 | (version (string-append "0.10.1-" "dev")) | ||
125 | (source | ||
126 | (local-file %source-dir | ||
127 | #:recursive? #t)) | ||
128 | ;;#:select? git-file?)) | ||
129 | (build-system gnu-build-system) | ||
130 | (inputs | ||
131 | `(("glpk" ,glpk) | ||
132 | ("gnurl" ,gnurl) | ||
133 | ("gstreamer" ,gstreamer) | ||
134 | ("gst-plugins-base" ,gst-plugins-base) | ||
135 | ("gnutls" ,gnutls) | ||
136 | ("libextractor" ,libextractor) | ||
137 | ("libgcrypt" ,libgcrypt) | ||
138 | ("libidn" ,libidn) | ||
139 | ("libmicrohttpd" ,libmicrohttpd) | ||
140 | ("libltdl" ,libltdl) | ||
141 | ("libunistring" ,libunistring) | ||
142 | ("openssl" ,openssl) | ||
143 | ("opus" ,opus) | ||
144 | ("pulseaudio" ,pulseaudio) | ||
145 | ("sqlite" ,sqlite) | ||
146 | ("postgresql" ,postgresql) | ||
147 | ("mysql" ,mysql) | ||
148 | ("zlib" ,zlib) | ||
149 | ("perl" ,perl) | ||
150 | ("python" ,python) ; tests and gnunet-qr | ||
151 | ("jansson" ,jansson) | ||
152 | ("nss" ,nss) | ||
153 | ("gmp" ,gmp) | ||
154 | ("bluez" ,bluez) ; for optional bluetooth feature | ||
155 | ("glib" ,glib) | ||
156 | ;; There are currently no binary substitutes for texlive due to | ||
157 | ;; its size. Uncomment if you need it. | ||
158 | ;;("texlive-minimal" ,texlive-minimal) ; optional. | ||
159 | ("libogg" ,libogg))) | ||
160 | (native-inputs | ||
161 | `(("pkg-config" ,pkg-config) | ||
162 | ("autoconf" ,autoconf) | ||
163 | ("automake" ,automake) | ||
164 | ("gnu-gettext" ,gnu-gettext) | ||
165 | ("libtool" ,libtool))) | ||
166 | (arguments | ||
167 | `(#:configure-flags | ||
168 | (list (string-append "--with-nssdir=" %output "/lib") | ||
169 | "--enable-experimental") | ||
170 | ;; These appear to be "broken" on Guix, needs debugging. | ||
171 | ;;"--enable-gcc-hardening" | ||
172 | ;;"--enable-linker-hardening" | ||
173 | ;;"--enable-logging=verbose") | ||
174 | ;;"--enable-poisoning") | ||
175 | ;;#:parallel-tests? #f ; parallel building seems to fail | ||
176 | ;;#:tests? #f ; fail: test_gnunet_statistics.py | ||
177 | #:phases | ||
178 | ;; swap check and install phases and set paths to installed bin | ||
179 | (modify-phases %standard-phases | ||
180 | (add-after 'unpack 'patch-bin-sh | ||
181 | (lambda _ | ||
182 | (substitute* "bootstrap" | ||
183 | (("contrib/pogen.sh") "sh contrib/pogen.sh")) | ||
184 | (for-each (lambda (f) (chmod f #o755)) | ||
185 | (find-files "po" "")) | ||
186 | #t)) | ||
187 | (add-after 'patch-bin-sh 'bootstrap | ||
188 | (lambda _ | ||
189 | (zero? (system* "sh" "bootstrap")))) | ||
190 | (delete 'check) | ||
191 | ;; XXX: https://gnunet.org/bugs/view.php?id=4619 | ||
192 | (add-after 'install 'set-path-for-check | ||
193 | (lambda* (#:key outputs #:allow-other-keys) | ||
194 | (let* ((out (assoc-ref outputs "out")) | ||
195 | (bin (string-append out "/bin")) | ||
196 | (lib (string-append out "/lib"))) | ||
197 | (setenv "GNUNET_PREFIX" lib) | ||
198 | (setenv "PATH" (string-append (getenv "PATH") ":" bin)) | ||
199 | (zero? (system* "make" "check")))))))) | ||
200 | (synopsis "Secure, decentralized, peer-to-peer networking framework") | ||
201 | (description | ||
202 | "GNUnet is a framework for secure peer-to-peer networking. The | ||
203 | high-level goal is to provide a strong foundation of free software for a | ||
204 | global, distributed network that provides security and privacy. GNUnet in | ||
205 | that sense aims to replace the current internet protocol stack. Along with | ||
206 | an application for secure publication of files, it has grown to include all | ||
207 | kinds of basic applications for the foundation of a GNU internet.") | ||
208 | (license license:gpl3+) | ||
209 | (home-page "https://gnunet.org/"))) | ||
210 | |||
211 | gnunet-svn | ||