diff options
-rw-r--r-- | contrib/packages/guix/guix-env-py2.scm | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/contrib/packages/guix/guix-env-py2.scm b/contrib/packages/guix/guix-env-py2.scm new file mode 100644 index 000000000..6085f96a9 --- /dev/null +++ b/contrib/packages/guix/guix-env-py2.scm | |||
@@ -0,0 +1,158 @@ | |||
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 (current-source-directory)) | ||
70 | |||
71 | (define gnunet-dev-env | ||
72 | (let* ((revision "1") | ||
73 | (select? (delay (or (git-predicate | ||
74 | (current-source-directory)) | ||
75 | source-file?)))) | ||
76 | (package | ||
77 | (inherit gnunet) | ||
78 | (name "gnunet") | ||
79 | (version (string-append "git" revision)) | ||
80 | (source | ||
81 | (local-file | ||
82 | (string-append (getcwd)) | ||
83 | #:recursive? #t)) | ||
84 | (inputs | ||
85 | `(("glpk" ,glpk) | ||
86 | ("gnurl" ,gnurl) | ||
87 | ("gstreamer" ,gstreamer) | ||
88 | ("gst-plugins-base" ,gst-plugins-base) | ||
89 | ("gnutls/dane" ,gnutls/dane) | ||
90 | ("libextractor" ,libextractor) | ||
91 | ("libgcrypt" ,libgcrypt) | ||
92 | ("libidn" ,libidn) | ||
93 | ("libmicrohttpd" ,libmicrohttpd) | ||
94 | ("libltdl" ,libltdl) | ||
95 | ("libunistring" ,libunistring) | ||
96 | ("openssl" ,openssl) | ||
97 | ("opus" ,opus) | ||
98 | ("pulseaudio" ,pulseaudio) | ||
99 | ("sqlite" ,sqlite) | ||
100 | ("postgresql" ,postgresql) | ||
101 | ("mysql" ,mysql) | ||
102 | ("zlib" ,zlib) | ||
103 | ("perl" ,perl) | ||
104 | ("python-2" ,python-2) ; tests and gnunet-qr | ||
105 | ("python2-future" ,python2-future) | ||
106 | ("jansson" ,jansson) | ||
107 | ("nss" ,nss) | ||
108 | ("glib" ,glib "bin") | ||
109 | ("gmp" ,gmp) | ||
110 | ("bluez" ,bluez) ; for optional bluetooth feature | ||
111 | ("glib" ,glib) | ||
112 | ;; ("texlive" ,texlive) ;FIXME: minimize. | ||
113 | ("texlive-tiny" ,texlive-tiny) ;; Seems to be enough for _just_ info output. | ||
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-documentation-only") | ||
131 | ;;;"--enable-logging=verbose" | ||
132 | ;;;"CFLAGS=-ggdb -O0") | ||
133 | #:phases | ||
134 | ;; swap check and install phases and set paths to installed bin | ||
135 | (modify-phases %standard-phases | ||
136 | (add-after 'unpack 'patch-bin-sh | ||
137 | (lambda _ | ||
138 | (for-each (lambda (f) (chmod f #o755)) | ||
139 | (find-files "po" "")) | ||
140 | #t)) | ||
141 | (add-after 'patch-bin-sh 'bootstrap | ||
142 | (lambda _ | ||
143 | (zero? (system* "sh" "bootstrap")))) | ||
144 | ;;(add-before 'build 'chdir | ||
145 | ;; (lambda _ | ||
146 | ;; (chdir "doc/documentation"))) | ||
147 | (delete 'check) | ||
148 | ;; XXX: https://gnunet.org/bugs/view.php?id=4619 | ||
149 | (add-after 'install 'set-path-for-check | ||
150 | (lambda* (#:key outputs #:allow-other-keys) | ||
151 | (let* ((out (assoc-ref outputs "out")) | ||
152 | (bin (string-append out "/bin")) | ||
153 | (lib (string-append out "/lib"))) | ||
154 | (setenv "GNUNET_PREFIX" lib) | ||
155 | (setenv "PATH" (string-append (getenv "PATH") ":" bin)) | ||
156 | (zero? (system* "make" "check"))))))))))) | ||
157 | |||
158 | gnunet-dev-env | ||