aboutsummaryrefslogtreecommitdiff
path: root/contrib/packages
diff options
context:
space:
mode:
authorng0 <ng0@infotropique.org>2017-09-28 16:50:34 +0000
committerng0 <ng0@infotropique.org>2017-09-28 16:50:34 +0000
commitb4685ebb7634f854f156bdc7c0b63ccbbe4c7aef (patch)
tree16b40a4d8ded66193c0995ab63b183471acd9bab /contrib/packages
parenta9946dabcb8ef0e13124930e70bb9060ad04eb5e (diff)
downloadgnunet-b4685ebb7634f854f156bdc7c0b63ccbbe4c7aef.tar.gz
gnunet-b4685ebb7634f854f156bdc7c0b63ccbbe4c7aef.zip
contrib/p/guix: Add new file to build gnunet with tests.
Diffstat (limited to 'contrib/packages')
-rw-r--r--contrib/packages/guix/gnunet.scm165
1 files changed, 165 insertions, 0 deletions
diff --git a/contrib/packages/guix/gnunet.scm b/contrib/packages/guix/gnunet.scm
new file mode 100644
index 000000000..a358fcecc
--- /dev/null
+++ b/contrib/packages/guix/gnunet.scm
@@ -0,0 +1,165 @@
1;;; This file is part of GNUnet.
2;;; Copyright (C) 2016, 2017 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(use-modules
20 (ice-9 popen)
21 (ice-9 match)
22 (ice-9 rdelim)
23 (guix packages)
24 (guix build-system gnu)
25 (guix gexp)
26 ((guix build utils) #:select (with-directory-excursion))
27 (guix git-download)
28 (guix utils) ; current-source-directory
29 (gnu packages)
30 (gnu packages aidc)
31 (gnu packages autotools)
32 (gnu packages backup)
33 (gnu packages base)
34 (gnu packages compression)
35 (gnu packages curl)
36 (gnu packages databases)
37 (gnu packages file)
38 (gnu packages gettext)
39 (gnu packages glib)
40 (gnu packages gnome)
41 (gnu packages gnunet)
42 (gnu packages gnupg)
43 (gnu packages gnuzilla)
44 (gnu packages groff)
45 (gnu packages gstreamer)
46 (gnu packages gtk)
47 (gnu packages guile)
48 (gnu packages image)
49 (gnu packages image-viewers)
50 (gnu packages libidn)
51 (gnu packages libunistring)
52 (gnu packages linux)
53 (gnu packages maths)
54 (gnu packages multiprecision)
55 (gnu packages perl)
56 (gnu packages pkg-config)
57 (gnu packages pulseaudio)
58 (gnu packages python)
59 (gnu packages tex)
60 (gnu packages texinfo)
61 (gnu packages tex)
62 (gnu packages tls)
63 (gnu packages video)
64 (gnu packages web)
65 (gnu packages xiph)
66 ((guix licenses) #:prefix license:))
67
68(define %source-dir (string-append (current-source-directory)
69 "/../../../"))
70
71(define gnunet-test-git
72 (let* ((revision "1")
73 (select? (delay (or (git-predicate
74 (string-append (current-source-directory)
75 "/../../../"))
76 source-file?))))
77 (package
78 (name "gnunet-test-git")
79 (version (string-append "0.10.1-" revision "." "dev"))
80 (source
81 (local-file ;;"../../.."
82 ;;%source-dir
83 ;;(string-append (getcwd) "/../../../")
84 (string-append (getcwd)) ;drrty hack and this assumes one static position FIXME!
85 #:recursive? #t))
86 ;;#:select? (git-predicate %source-dir)))
87 ;;#:select? (force select?)))
88 (build-system gnu-build-system)
89 (inputs
90 `(("glpk" ,glpk)
91 ("gnurl" ,gnurl)
92 ("gstreamer" ,gstreamer)
93 ("gst-plugins-base" ,gst-plugins-base)
94 ("gnutls" ,gnutls) ;Change to gnutls/dane once it is merged.
95 ("libextractor" ,libextractor)
96 ("libgcrypt" ,libgcrypt)
97 ("libidn" ,libidn)
98 ("libmicrohttpd" ,libmicrohttpd)
99 ("libltdl" ,libltdl)
100 ("libunistring" ,libunistring)
101 ("openssl" ,openssl)
102 ("opus" ,opus)
103 ("pulseaudio" ,pulseaudio)
104 ("sqlite" ,sqlite)
105 ("postgresql" ,postgresql)
106 ("mysql" ,mysql)
107 ("zlib" ,zlib)
108 ("perl" ,perl)
109 ("python" ,python) ; tests and gnunet-qr
110 ("jansson" ,jansson)
111 ("nss" ,nss)
112 ("glib" ,glib "bin")
113 ("gmp" ,gmp)
114 ("bluez" ,bluez) ; for optional bluetooth feature
115 ("glib" ,glib)
116 ;; There are currently no binary substitutes for texlive on
117 ;; hydra.gnu.org or its mirrors due to its size. Uncomment if you need it.
118 ;;("texlive-minimal" ,texlive-minimal) ; optional.
119 ("texlive" ,texlive)
120 ("libogg" ,libogg)))
121 (native-inputs
122 `(("pkg-config" ,pkg-config)
123 ("autoconf" ,autoconf)
124 ("automake" ,automake)
125 ("gnu-gettext" ,gnu-gettext)
126 ("texinfo" ,texinfo-5) ; Debian stable: 5.2
127 ("libtool" ,libtool)))
128 (outputs '("out" "debug"))
129 (arguments
130 `(#:configure-flags
131 (list (string-append "--with-nssdir=" %output "/lib")
132 "--enable-gcc-hardening"
133 "--enable-linker-hardening"
134 "--enable-logging=verbose"
135 "CFLAGS=-ggdb -O0")
136 #:phases
137 ;; swap check and install phases and set paths to installed bin
138 (modify-phases %standard-phases
139 (add-after 'unpack 'patch-bin-sh
140 (lambda _
141 (substitute* "bootstrap"
142 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
143 (for-each (lambda (f) (chmod f #o755))
144 (find-files "po" ""))
145 #t))
146 (add-after 'patch-bin-sh 'bootstrap
147 (lambda _
148 (zero? (system* "sh" "bootstrap"))))
149 (delete 'check)
150 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
151 (add-after 'install 'set-path-for-check
152 (lambda* (#:key outputs #:allow-other-keys)
153 (let* ((out (assoc-ref outputs "out"))
154 (bin (string-append out "/bin"))
155 (lib (string-append out "/lib")))
156 (setenv "GNUNET_PREFIX" lib)
157 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
158 (zero? (system* "make" "check"))))))))
159 (synopsis "tests enabled without experimental")
160 (description
161 "GNUnet from git HEAD")
162 (license license:gpl3+)
163 (home-page "https://gnunet.org"))))
164
165gnunet-test-git