aboutsummaryrefslogtreecommitdiff
path: root/guix-env.scm
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2018-01-08 15:21:23 +0000
committerng0 <ng0@n0.is>2018-01-08 15:21:23 +0000
commit3e2c2d6c40845d53b2809ec4a224e6d51eea5d73 (patch)
treebf03378e183d5d38299917b72169418f1a2029ec /guix-env.scm
parentea351cef94af33ccf28c66434c28aefc100ad6e0 (diff)
downloadgnunet-3e2c2d6c40845d53b2809ec4a224e6d51eea5d73.tar.gz
gnunet-3e2c2d6c40845d53b2809ec4a224e6d51eea5d73.zip
clean up contrib: move 2 guix files to the root level. folder structure will be moved to https://c.n0.is/ng0_guix/packages
Diffstat (limited to 'guix-env.scm')
-rw-r--r--guix-env.scm156
1 files changed, 156 insertions, 0 deletions
diff --git a/guix-env.scm b/guix-env.scm
new file mode 100644
index 000000000..7708b2706
--- /dev/null
+++ b/guix-env.scm
@@ -0,0 +1,156 @@
1;;; This file is part of GNUnet.
2;;; Copyright (C) 2016, 2017, 2018 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 upnp)
64 (gnu packages video)
65 (gnu packages web)
66 (gnu packages xiph)
67 ((guix licenses) #:prefix license:))
68
69(define %source-dir (string-append (current-source-directory)
70 "/../../../"))
71
72(define gnunet-dev-env
73 (let* ((revision "1")
74 (select? (delay (or (git-predicate
75 (string-append (current-source-directory)
76 "/../../../"))
77 source-file?))))
78 (package
79 (inherit gnunet)
80 (name "gnunet-dev-env")
81 (version (string-append "0.11-" revision "." "dev-env"))
82 (source
83 (local-file
84 (string-append (getcwd))
85 #:recursive? #t))
86 (inputs
87 `(("glpk" ,glpk)
88 ("gnurl" ,gnurl)
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)
94 ("libidn" ,libidn)
95 ("libmicrohttpd" ,libmicrohttpd)
96 ("libltdl" ,libltdl)
97 ("libunistring" ,libunistring)
98 ("openssl" ,openssl)
99 ("opus" ,opus)
100 ("pulseaudio" ,pulseaudio)
101 ("sqlite" ,sqlite)
102 ("postgresql" ,postgresql)
103 ("mysql" ,mysql)
104 ("zlib" ,zlib)
105 ("perl" ,perl)
106 ("python-2" ,python-2) ; tests and gnunet-qr
107 ("jansson" ,jansson)
108 ("nss" ,nss)
109 ("glib" ,glib "bin")
110 ("gmp" ,gmp)
111 ("bluez" ,bluez) ; for optional bluetooth feature
112 ("glib" ,glib)
113 ("texlive" ,texlive) ;FIXME: minimize.
114 ("miniupnpc" ,miniupnpc)
115 ("libogg" ,libogg)))
116 (native-inputs
117 `(("pkg-config" ,pkg-config)
118 ("autoconf" ,autoconf)
119 ("automake" ,automake)
120 ("gnu-gettext" ,gnu-gettext)
121 ("which" ,which)
122 ("texinfo" ,texinfo-5) ; Debian stable: 5.2
123 ("libtool" ,libtool)))
124 (outputs '("out" "debug"))
125 (arguments
126 `(#:configure-flags
127 (list (string-append "--with-nssdir=" %output "/lib")
128 ;;"--enable-gcc-hardening"
129 ;;"--enable-linker-hardening"
130 "--enable-logging=verbose"
131 "CFLAGS=-ggdb -O0")
132 #:phases
133 ;; swap check and install phases and set paths to installed bin
134 (modify-phases %standard-phases
135 (add-after 'unpack 'patch-bin-sh
136 (lambda _
137 (substitute* "bootstrap"
138 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
139 (for-each (lambda (f) (chmod f #o755))
140 (find-files "po" ""))
141 #t))
142 (add-after 'patch-bin-sh 'bootstrap
143 (lambda _
144 (zero? (system* "sh" "bootstrap"))))
145 (delete 'check)
146 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
147 (add-after 'install 'set-path-for-check
148 (lambda* (#:key outputs #:allow-other-keys)
149 (let* ((out (assoc-ref outputs "out"))
150 (bin (string-append out "/bin"))
151 (lib (string-append out "/lib")))
152 (setenv "GNUNET_PREFIX" lib)
153 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
154 (zero? (system* "make" "check")))))))))))
155
156gnunet-dev-env