guix-env-py2.scm 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. ((guix licenses) #:prefix license:))
  67. (define %source-dir (current-source-directory))
  68. (define gnunet-dev-env
  69. (let* ((revision "1")
  70. (select? (delay (or (git-predicate
  71. (current-source-directory))
  72. source-file?))))
  73. (package
  74. (inherit gnunet)
  75. (name "gnunet")
  76. (version (string-append "git" revision))
  77. (source
  78. (local-file
  79. (string-append (getcwd))
  80. #:recursive? #t))
  81. (inputs
  82. `(("glpk" ,glpk)
  83. ("gnurl" ,gnurl)
  84. ("gstreamer" ,gstreamer)
  85. ("gst-plugins-base" ,gst-plugins-base)
  86. ("gnutls/dane" ,gnutls/dane)
  87. ("libextractor" ,libextractor)
  88. ("libgcrypt" ,libgcrypt)
  89. ("libidn" ,libidn)
  90. ("libmicrohttpd" ,libmicrohttpd)
  91. ("libltdl" ,libltdl)
  92. ("libunistring" ,libunistring)
  93. ("openssl" ,openssl)
  94. ("opus" ,opus)
  95. ("pulseaudio" ,pulseaudio)
  96. ("sqlite" ,sqlite)
  97. ("postgresql" ,postgresql)
  98. ("mysql" ,mysql)
  99. ("zlib" ,zlib)
  100. ("perl" ,perl)
  101. ("python-2" ,python-2) ; tests and gnunet-qr
  102. ("jansson" ,jansson)
  103. ("nss" ,nss)
  104. ("glib" ,glib "bin")
  105. ("gmp" ,gmp)
  106. ("bluez" ,bluez) ; for optional bluetooth feature
  107. ("glib" ,glib)
  108. ;; ("texlive" ,texlive) ;FIXME: minimize.
  109. ("texlive-tiny" ,texlive-tiny) ;; Seems to be enough for _just_ info output.
  110. ("miniupnpc" ,miniupnpc)
  111. ("libogg" ,libogg)))
  112. (native-inputs
  113. `(("pkg-config" ,pkg-config)
  114. ("autoconf" ,autoconf)
  115. ("automake" ,automake)
  116. ("gnu-gettext" ,gnu-gettext)
  117. ("which" ,which)
  118. ("texinfo" ,texinfo-5) ; Debian stable: 5.2
  119. ("libtool" ,libtool)))
  120. (outputs '("out" "debug"))
  121. (arguments
  122. `(;#:configure-flags
  123. ;;(list (string-append "--with-nssdir=" %output "/lib")
  124. ;;"--enable-gcc-hardening"
  125. ;;"--enable-linker-hardening"
  126. ;;;;"--enable-documentation-only")
  127. ;;;"--enable-logging=verbose"
  128. ;;;"CFLAGS=-ggdb -O0")
  129. #:phases
  130. ;; swap check and install phases and set paths to installed bin
  131. (modify-phases %standard-phases
  132. (add-after 'unpack 'patch-bin-sh
  133. (lambda _
  134. (for-each (lambda (f) (chmod f #o755))
  135. (find-files "po" ""))
  136. #t))
  137. (add-after 'patch-bin-sh 'bootstrap
  138. (lambda _
  139. (zero? (system* "sh" "bootstrap"))))
  140. ;;(add-before 'build 'chdir
  141. ;; (lambda _
  142. ;; (chdir "doc/documentation")))
  143. (delete 'check)
  144. ;; XXX: https://gnunet.org/bugs/view.php?id=4619
  145. (add-after 'install 'set-path-for-check
  146. (lambda* (#:key outputs #:allow-other-keys)
  147. (let* ((out (assoc-ref outputs "out"))
  148. (bin (string-append out "/bin"))
  149. (lib (string-append out "/lib")))
  150. (setenv "GNUNET_PREFIX" lib)
  151. (setenv "PATH" (string-append (getenv "PATH") ":" bin))
  152. (zero? (system* "make" "check")))))))))))
  153. gnunet-dev-env