aboutsummaryrefslogtreecommitdiff
path: root/guix.scm
blob: ab52ef8ef919370e84ebc7a9f93ee9869b189a61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
;;; GNUnet-Guile --- Guile bindings for GNUnet.
;;; Copyright @ 2017, 2018 ng0 <ng0@n0.is>
;;; Copyright @ 2018 Amriouche Boubekki <amirouche@hypermove.net>
;;;
;;; This file is part of GNUnet-Guile.
;;;
;;; GNUnet-Guile is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNUnet-Guile is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNUnet-Guile.  If not, see <http://www.gnu.org/licenses/>.

(use-modules
 (ice-9 popen)
 (ice-9 match)
 (ice-9 rdelim)
 (guix packages)
 (guix build-system gnu)
 (guix gexp)
 ((guix build utils) #:select (with-directory-excursion))
 (guix git-download)
 (guix utils) ; current-source-directory
 ;;(gnunet packages gnunet) ; the GUIX_PACKAGE_PATH in gnunet.git
 (gnu packages)
 (gnu packages aidc)
 (gnu packages autotools)
 (gnu packages backup)
 (gnu packages base)
 (gnu packages compression)
 (gnu packages curl)
 (gnu packages databases)
 (gnu packages file)
 (gnu packages gettext)
 (gnu packages glib)
 (gnu packages gnome)
 (gnu packages gnunet)
 (gnu packages gnupg)
 (gnu packages gnuzilla)
 (gnu packages groff)
 (gnu packages gstreamer)
 (gnu packages gtk)
 (gnu packages guile)
 (gnu packages image)
 (gnu packages image-viewers)
 (gnu packages libidn)
 (gnu packages libunistring)
 (gnu packages linux)
 (gnu packages maths)
 (gnu packages multiprecision)
 (gnu packages ncurses)
 (gnu packages perl)
 (gnu packages pkg-config)
 (gnu packages pulseaudio)
 (gnu packages python)
 (gnu packages tex)
 (gnu packages texinfo)
 (gnu packages tex)
 (gnu packages tls)
 (gnu packages upnp)
 (gnu packages video)
 (gnu packages web)
 (gnu packages xiph)
 ((guix licenses) #:prefix license:))

;; FIXME: Load this from GUIX_PACKAGE_PATH in gnunet.git -> HOW?
;; Just the way it is commented throws an error.
;; (define gnunetg-for-guile-gnunet
;;   (package
;;     (inherit gnunetg)
;;     (name "gnunetg-for-guile-gnunet")))

;; TEMP FIX until we have the problem fixed above.
;; XXX: Bump this when gnunetg in gnunet.git is bumped!
(define gnunet-git
  (let* ((commit "477e0dec4d6e9a51af2258611f45adea319ff6ae")
         (revision "2"))
    (package
      (inherit gnunet)
      (name "gnunet-git")
      ;; TODO: use git-version
      (version (string-append "0.10.1" "-" revision
                              "." (string-take commit 7)))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://gnunet.org/git/gnunet.git")
               (commit commit)))
         (file-name (string-append name "-" version "-checkout"))
         (sha256
          (base32
           "07p9j0z1ghd50m9g1x1fv94w4x2khli6wn8n2cbjcvycand4fpv5"))))
      (build-system gnu-build-system)
      (inputs
       `(("glpk" ,glpk)
         ("gnurl" ,gnurl)
         ("gstreamer" ,gstreamer)
         ("gst-plugins-base" ,gst-plugins-base)
         ("gnutls/dane" ,gnutls/dane) ;Change to gnutls/dane once it is merged.
         ("libextractor" ,libextractor)
         ("libgcrypt" ,libgcrypt)
         ("libidn" ,libidn)
         ("libmicrohttpd" ,libmicrohttpd)
         ("libltdl" ,libltdl)
         ("libunistring" ,libunistring)
         ("openssl" ,openssl)
         ("opus" ,opus)
         ("pulseaudio" ,pulseaudio)
         ("sqlite" ,sqlite)
         ("postgresql" ,postgresql)
         ("mysql" ,mysql)
         ("zlib" ,zlib)
         ("perl" ,perl)
         ("python-2" ,python-2) ; tests and gnunet-qr
         ("jansson" ,jansson)
         ("nss" ,nss)
         ("glib" ,glib "bin")
         ("gmp" ,gmp)
         ("bluez" ,bluez) ; for optional bluetooth feature
         ("glib" ,glib)
         ;; TODO: figure out the right texlive parts.
         ;;("texlive-minimal" ,texlive-minimal)
         ("texlive-tiny" ,texlive-tiny)
         ("miniupnpc" ,miniupnpc)
         ("libogg" ,libogg)))
      (native-inputs
       `(("pkg-config" ,pkg-config)
         ("autoconf" ,autoconf)
         ("automake" ,automake)
         ("gnu-gettext" ,gnu-gettext)
         ("which" ,which)
         ("texinfo" ,texinfo-5) ; Debian stable: 5.2
         ("libtool" ,libtool)))
      (outputs '("out" "debug"))
      (arguments
       `(#:configure-flags
         (list (string-append "--with-nssdir=" %output "/lib"))
               ;; AFAIK not necessary, will also regulary lead to broken
               ;; GNUnet builds (experimental is what it says)
               ;; "--enable-experimental")
         #:parallel-tests? #f ; parallel building is not functional
         #:tests? #f ; FAIL: test_gnunet_statistics.py
         #:phases
         ;; swap check and install phases and set paths to installed bin
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-bin-sh
             (lambda _
               (substitute* "bootstrap"
                 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
               (for-each (lambda (f) (chmod f #o755))
                         (find-files "po" ""))
               #t))
           (add-after 'patch-bin-sh 'bootstrap
             (lambda _
               (zero? (system* "sh" "bootstrap"))))
           (delete 'check)))))))

gnunet-git