2
0

guix-env-gillmann.scm 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. (use-modules
  19. (ice-9 popen)
  20. (ice-9 match)
  21. (ice-9 rdelim)
  22. (guix packages)
  23. (guix build-system gnu)
  24. (guix gexp)
  25. ((guix build utils) #:select (with-directory-excursion))
  26. (guix git-download)
  27. (guix utils) ; current-source-directory
  28. (gnu packages)
  29. (gnu packages aidc)
  30. (gnu packages autotools)
  31. (gnu packages backup)
  32. (gnu packages base)
  33. (gnu packages compression)
  34. (gnu packages curl)
  35. (gnu packages databases)
  36. (gnu packages file)
  37. (gnu packages gettext)
  38. (gnu packages glib)
  39. (gnu packages gnome)
  40. (gnu packages gnunet)
  41. (gnu packages gnupg)
  42. (gnu packages gnuzilla)
  43. (gnu packages groff)
  44. (gnu packages gstreamer)
  45. (gnu packages gtk)
  46. (gnu packages guile)
  47. (gnu packages image)
  48. (gnu packages image-viewers)
  49. (gnu packages libidn)
  50. (gnu packages libunistring)
  51. (gnu packages linux)
  52. (gnu packages maths)
  53. (gnu packages multiprecision)
  54. (gnu packages perl)
  55. (gnu packages pkg-config)
  56. (gnu packages pulseaudio)
  57. (gnu packages python)
  58. (gnu packages tex)
  59. (gnu packages texinfo)
  60. (gnu packages tex)
  61. (gnu packages tls)
  62. (gnu packages upnp)
  63. (gnu packages video)
  64. (gnu packages web)
  65. (gnu packages xiph)
  66. (ports app-text mandoc mandoc)
  67. (ports app-text texi2mdoc texi2mdoc)
  68. ((guix licenses) #:prefix license:))
  69. (define %source-dir (current-source-directory))
  70. (define gnunet-dev-env
  71. (let* ((revision "1")
  72. (select? (delay (or (git-predicate
  73. (current-source-directory))
  74. source-file?))))
  75. (package
  76. (inherit gnunet)
  77. (name "gnunet")
  78. (version (string-append "git" revision))
  79. (source
  80. (local-file
  81. (string-append (getcwd))
  82. #:recursive? #t))
  83. (inputs
  84. `(("glpk" ,glpk)
  85. ("gnurl" ,gnurl)
  86. ("gstreamer" ,gstreamer)
  87. ("gst-plugins-base" ,gst-plugins-base)
  88. ("gnutls/dane" ,gnutls/dane)
  89. ("iptables" ,iptables)
  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. ("mariadb" ,mariadb)
  102. ("zlib" ,zlib)
  103. ("perl" ,perl)
  104. ("python-2" ,python-2) ; tests and gnunet-qr
  105. ("jansson" ,jansson)
  106. ("nss" ,nss)
  107. ("glib" ,glib "bin")
  108. ("gmp" ,gmp)
  109. ("bluez" ,bluez) ; for optional bluetooth feature
  110. ("glib" ,glib)
  111. ;; ("texlive" ,texlive) ;FIXME: minimize.
  112. ("texlive-tiny" ,texlive-tiny) ;; Seems to be enough for _just_ info output.
  113. ("miniupnpc" ,miniupnpc)
  114. ("libogg" ,libogg)))
  115. (native-inputs
  116. `(("pkg-config" ,pkg-config)
  117. ("autoconf" ,autoconf)
  118. ("automake" ,automake)
  119. ("gnu-gettext" ,gnu-gettext)
  120. ("which" ,which)
  121. ("mandoc" ,mandoc)
  122. ("texi2mdoc" ,texi2mdoc)
  123. ("texinfo" ,texinfo-5) ; Debian stable: 5.2
  124. ("libtool" ,libtool)))
  125. (outputs '("out" "debug"))
  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. (arguments
  134. `(#:configure-flags (list "--enable-section7")
  135. #:phases
  136. ;; swap check and install phases and set paths to installed bin
  137. (modify-phases %standard-phases
  138. (add-after 'unpack 'patch-bin-sh
  139. (lambda _
  140. (for-each (lambda (f) (chmod f #o755))
  141. (find-files "po" ""))
  142. #t))
  143. (add-after 'patch-bin-sh 'bootstrap
  144. (lambda _
  145. (invoke "sh" "bootstrap")))
  146. (add-after 'build 'install-section7
  147. (lambda _
  148. (with-directory-excursion "doc/documentation"
  149. (invoke "make" "gnunet-c-tutorial.7")
  150. (invoke "make" "gnunet-documentation.7")
  151. (mkdir-p (string-append (assoc-ref %outputs "out")
  152. "/share/man/man7"))
  153. (copy-file "../man/gnunet-c-tutorial.7"
  154. (string-append (assoc-ref %outputs "out")
  155. "/share/man/man7/gnunet-c-tutorial.7"))
  156. (copy-file "../man/gnunet-documentation.7"
  157. (string-append (assoc-ref %outputs "out")
  158. "/share/man/man7/gnunet-documentation.7")))))
  159. ;;(add-before 'build 'chdir
  160. ;; (lambda _
  161. ;; (chdir "doc/documentation")))
  162. (delete 'check)))))))
  163. ;; XXX: https://gnunet.org/bugs/view.php?id=4619
  164. gnunet-dev-env