You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

157 lines
5.8 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages tcl)
  19. #:use-module (guix packages)
  20. #:use-module (guix download)
  21. #:use-module (guix build-system gnu)
  22. #:use-module (gnu packages xorg)
  23. #:use-module (guix licenses))
  24. (define-public tcl
  25. (package
  26. (name "tcl")
  27. (version "8.6.0")
  28. (source
  29. (origin
  30. (method url-fetch)
  31. (uri (string-append "mirror://sourceforge/tcl/Tcl/"
  32. version "/tcl" version "-src.tar.gz"))
  33. (sha256
  34. (base32
  35. "1pnabp3xsja4rc8c01l9q1avb65a3zhdzci3j54qa5krqjwj4i1m"))))
  36. (build-system gnu-build-system)
  37. (arguments
  38. '(#:phases (alist-cons-before
  39. 'configure 'pre-configure
  40. (lambda _
  41. (chdir "unix"))
  42. (alist-cons-after
  43. 'install 'install-private-headers
  44. (lambda* (#:key outputs #:allow-other-keys)
  45. ;; Private headers are needed by Expect.
  46. (and (zero? (system* "make"
  47. "install-private-headers"))
  48. (let ((bin (string-append (assoc-ref outputs "out")
  49. "/bin")))
  50. ;; Create a tclsh -> tclsh8.6 symlink.
  51. ;; Programs such as Ghostscript rely on it.
  52. (with-directory-excursion bin
  53. (symlink (car (find-files "." "tclsh"))
  54. "tclsh")))))
  55. %standard-phases))
  56. ;; XXX: There are a few test failures (related to HTTP, most
  57. ;; likely related to name resolution), but that doesn't cause
  58. ;; `make' to fail.
  59. #:test-target "test"))
  60. (home-page "http://www.tcl.tk/")
  61. (synopsis "The Tcl scripting language")
  62. (description "The Tcl (Tool Command Language) scripting language.")
  63. (license (bsd-style "http://www.tcl.tk/software/tcltk/license.html"
  64. "Tcl/Tk license"))))
  65. (define-public expect
  66. (package
  67. (name "expect")
  68. (version "5.45")
  69. (source
  70. (origin
  71. (method url-fetch)
  72. (uri (string-append "mirror://sourceforge/expect/Expect/"
  73. version "/expect" version ".tar.gz"))
  74. (sha256
  75. (base32
  76. "0h60bifxj876afz4im35rmnbnxjx4lbdqp2ja3k30fwa8a8cm3dj"))))
  77. (build-system gnu-build-system)
  78. (inputs
  79. `(;; TODO: Add these optional dependencies.
  80. ;; ("libX11" ,libX11)
  81. ;; ("xproto" ,xproto)
  82. ;; ("tk" ,tk)
  83. ("tcl" ,tcl)))
  84. (arguments
  85. '(#:configure-flags
  86. (list (string-append "--with-tcl="
  87. (assoc-ref %build-inputs "tcl")
  88. "/lib")
  89. (string-append "--with-tclinclude="
  90. (assoc-ref %build-inputs "tcl")
  91. "/include")
  92. (string-append "--exec-prefix="
  93. (assoc-ref %outputs "out")))
  94. #:phases (alist-cons-before
  95. 'configure 'set-path-to-stty
  96. (lambda _
  97. (substitute* "configure"
  98. (("STTY_BIN=/bin/stty")
  99. (string-append "STTY_BIN=" (which "stty")))))
  100. %standard-phases)
  101. #:test-target "test"))
  102. (home-page "http://expect.nist.gov/")
  103. (synopsis
  104. "A tool for automating interactive applications")
  105. (description
  106. "Expect is a tool for automating interactive applications such as
  107. telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this
  108. stuff trivial. Expect is also useful for testing these same
  109. applications. And by adding Tk, you can wrap interactive applications in
  110. X11 GUIs.")
  111. (license public-domain))) ; as written in `license.terms'
  112. (define-public tk
  113. (package
  114. (name "tk")
  115. (version "8.6.0")
  116. (source (origin
  117. (method url-fetch)
  118. (uri (string-append "mirror://sourceforge/tcl/Tcl/"
  119. version "/tk" version "-src.tar.gz"))
  120. (sha256
  121. (base32
  122. "1rld0l7p1h31z488w44j170jpsm11xsjf2qrb7gid2b5dwmqnw2w"))))
  123. (build-system gnu-build-system)
  124. (arguments
  125. '(#:phases (alist-cons-before
  126. 'configure 'pre-configure
  127. (lambda _
  128. (chdir "unix"))
  129. %standard-phases)
  130. #:configure-flags (list (string-append "--with-tcl="
  131. (assoc-ref %build-inputs "tcl")
  132. "/lib"))
  133. ;; The tests require a running X server, so we just skip them.
  134. #:tests? #f))
  135. (inputs `(("tcl" ,tcl)))
  136. ;; tk.h refers to X11 headers, hence the propagation.
  137. (propagated-inputs `(("libx11" ,libx11)
  138. ("libxext" ,libxext)))
  139. (home-page "http://www.tcl.tk/")
  140. (synopsis "Graphical user interface toolkit for Tcl")
  141. (description
  142. "Tk is a graphical toolkit for building graphical user interfaces
  143. (GUIs) in the Tcl language.")
  144. (license (package-license tcl))))