aboutsummaryrefslogtreecommitdiff
path: root/contrib/packages/guix/guix-env.scm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/packages/guix/guix-env.scm')
-rw-r--r--contrib/packages/guix/guix-env.scm189
1 files changed, 189 insertions, 0 deletions
diff --git a/contrib/packages/guix/guix-env.scm b/contrib/packages/guix/guix-env.scm
new file mode 100644
index 000000000..54731858e
--- /dev/null
+++ b/contrib/packages/guix/guix-env.scm
@@ -0,0 +1,189 @@
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;; Guix package for GNUnet development
20;;
21;; INSTALL
22;; -------
23;;
24;; To build and install the package in the user environment, use:
25;;
26;; guix package --install-from-file=guix-env.scm
27;;
28;; BUILD ONLY
29;; ----------
30;;
31;; Precondition for using this file is that you run Guix and have a
32;; development setup for this setup, which involves a version of Guile in
33;; your PATH.
34;;
35;; guix build -f guix-env.scm
36;;
37;; We'd like to provide advanced functions such as guix environment specific
38;; gnunet-git package and usage of gnunet-gtk-git, but this is subject
39;; to tests right now.
40;;
41;; Further versions of GNUnet for Guix can currently be found in
42;; https://gitweb.krosos.org/ng0_guix/packages.git/
43
44(use-modules
45 (ice-9 popen)
46 (ice-9 match)
47 (ice-9 rdelim)
48 (guix packages)
49 (guix build-system gnu)
50 (guix gexp)
51 ((guix build utils) #:select (with-directory-excursion))
52 (guix git-download)
53 (gnu packages)
54 (gnu packages aidc)
55 (gnu packages autotools)
56 (gnu packages backup)
57 (gnu packages base)
58 (gnu packages compression)
59 (gnu packages curl)
60 (gnu packages databases)
61 (gnu packages file)
62 (gnu packages gettext)
63 (gnu packages glib)
64 (gnu packages gnome)
65 (gnu packages gnunet)
66 (gnu packages gnupg)
67 (gnu packages gnuzilla)
68 (gnu packages groff)
69 (gnu packages gstreamer)
70 (gnu packages gtk)
71 (gnu packages guile)
72 (gnu packages image)
73 (gnu packages image-viewers)
74 (gnu packages libidn)
75 (gnu packages libunistring)
76 (gnu packages linux)
77 (gnu packages maths)
78 (gnu packages multiprecision)
79 (gnu packages perl)
80 (gnu packages pkg-config)
81 (gnu packages pulseaudio)
82 (gnu packages python)
83 (gnu packages tex)
84 (gnu packages texinfo)
85 (gnu packages tls)
86 (gnu packages video)
87 (gnu packages web)
88 (gnu packages xiph)
89 ((guix licenses) #:prefix license:))
90
91(define %source-dir (dirname (current-filename)))
92
93(define gnunet-git
94 (let* ((revision "1"))
95 (package
96 (name "gnunet-git")
97 (version (string-append "0.10.1-" revision "." "dev"))
98 (source
99 (local-file %source-dir
100 #:recursive? #t))
101 (build-system gnu-build-system)
102 (inputs
103 `(("glpk" ,glpk)
104 ("gnurl" ,gnurl)
105 ("gstreamer" ,gstreamer)
106 ("gst-plugins-base" ,gst-plugins-base)
107 ("gnutls" ,gnutls)
108 ("libextractor" ,libextractor)
109 ("libgcrypt" ,libgcrypt)
110 ("libidn" ,libidn)
111 ("libmicrohttpd" ,libmicrohttpd)
112 ("libltdl" ,libltdl)
113 ("libunistring" ,libunistring)
114 ("openssl" ,openssl)
115 ("opus" ,opus)
116 ("pulseaudio" ,pulseaudio)
117 ("sqlite" ,sqlite)
118 ("postgresql" ,postgresql)
119 ("mysql" ,mysql)
120 ("zlib" ,zlib)
121 ("perl" ,perl)
122 ("python" ,python) ; tests and gnunet-qr
123 ("jansson" ,jansson)
124 ("nss" ,nss)
125 ("gmp" ,gmp)
126 ("bluez" ,bluez) ; for optional bluetooth feature
127 ("glib" ,glib)
128 ;; There are currently no binary substitutes for texlive on
129 ;; hydra.gnu.org or its mirrors due to its size. Uncomment if you need it.
130 ;;("texlive-minimal" ,texlive-minimal) ; optional.
131 ("libogg" ,libogg)))
132 (native-inputs
133 `(("pkg-config" ,pkg-config)
134 ("autoconf" ,autoconf)
135 ("automake" ,automake)
136 ("gnu-gettext" ,gnu-gettext)
137 ("texinfo" ,texinfo)
138 ("libtool" ,libtool)))
139 ;; TODO: To make use of out:debug, which carries the symbols,
140 ;; this file needs to fixed.
141 (outputs '("out" "debug"))
142 (arguments
143 `(#:configure-flags
144 (list (string-append "--with-nssdir=" %output "/lib")
145 "--enable-gcc-hardening"
146 "--enable-linker-hardening"
147
148 "--enable-poisoning"
149 "--enable-sanitizer"
150 "--enable-experimental"
151 "--enable-logging=verbose"
152 "CFLAGS=-ggdb -O0")
153 ;;#:parallel-tests? #f ; parallel building seems to fail
154 ;;#:tests? #f ; fail: test_gnunet_statistics.py
155 #:phases
156 ;; swap check and install phases and set paths to installed bin
157 (modify-phases %standard-phases
158 (add-after 'unpack 'patch-bin-sh
159 (lambda _
160 (substitute* "bootstrap"
161 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
162 (for-each (lambda (f) (chmod f #o755))
163 (find-files "po" ""))
164 #t))
165 (add-after 'patch-bin-sh 'bootstrap
166 (lambda _
167 (zero? (system* "sh" "bootstrap"))))
168 (delete 'check))))
169 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
170 ;; (add-after 'install 'set-path-for-check
171 ;; (lambda* (#:key outputs #:allow-other-keys)
172 ;; (let* ((out (assoc-ref outputs "out"))
173 ;; (bin (string-append out "/bin"))
174 ;; (lib (string-append out "/lib")))
175 ;; (setenv "GNUNET_PREFIX" lib)
176 ;; (setenv "PATH" (string-append (getenv "PATH") ":" bin))
177 ;; (zero? (system* "make" "check"))))))))
178 (synopsis "Secure, decentralized, peer-to-peer networking framework")
179 (description
180 "GNUnet is a framework for secure peer-to-peer networking. The
181high-level goal is to provide a strong foundation of free software for a
182global, distributed network that provides security and privacy. GNUnet in
183that sense aims to replace the current internet protocol stack. Along with
184an application for secure publication of files, it has grown to include all
185kinds of basic applications for the foundation of a GNU internet.")
186 (license license:gpl3+)
187 (home-page "https://gnunet.org/"))))
188
189gnunet-git