gnu: pari-gp: Update to 2.5.4.
[jackhill/guix/guix.git] / gnu / packages / tcl.scm
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
19 (define-module (gnu packages tcl)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix build-system gnu)
23 #:use-module (gnu packages xorg)
24 #:use-module (guix licenses))
25
26 (define-public tcl
27 (package
28 (name "tcl")
29 (version "8.6.0")
30 (source
31 (origin
32 (method url-fetch)
33 (uri (string-append "mirror://sourceforge/tcl/Tcl/"
34 version "/tcl" version "-src.tar.gz"))
35 (sha256
36 (base32
37 "1pnabp3xsja4rc8c01l9q1avb65a3zhdzci3j54qa5krqjwj4i1m"))))
38 (build-system gnu-build-system)
39 (arguments
40 '(#:phases (alist-cons-before
41 'configure 'pre-configure
42 (lambda _
43 (chdir "unix"))
44 (alist-cons-after
45 'install 'install-private-headers
46 (lambda* (#:key outputs #:allow-other-keys)
47 ;; Private headers are needed by Expect.
48 (and (zero? (system* "make"
49 "install-private-headers"))
50 (let ((bin (string-append (assoc-ref outputs "out")
51 "/bin")))
52 ;; Create a tclsh -> tclsh8.6 symlink.
53 ;; Programs such as Ghostscript rely on it.
54 (with-directory-excursion bin
55 (symlink (car (find-files "." "tclsh"))
56 "tclsh")))))
57 %standard-phases))
58
59 ;; XXX: There are a few test failures (related to HTTP, most
60 ;; likely related to name resolution), but that doesn't cause
61 ;; `make' to fail.
62 #:test-target "test"))
63 (home-page "http://www.tcl.tk/")
64 (synopsis "The Tcl scripting language")
65 (description "The Tcl (Tool Command Language) scripting language.")
66 (license (bsd-style "http://www.tcl.tk/software/tcltk/license.html"
67 "Tcl/Tk license"))))
68
69
70 (define-public expect
71 (package
72 (name "expect")
73 (version "5.45")
74 (source
75 (origin
76 (method url-fetch)
77 (uri (string-append "mirror://sourceforge/expect/Expect/"
78 version "/expect" version ".tar.gz"))
79 (sha256
80 (base32
81 "0h60bifxj876afz4im35rmnbnxjx4lbdqp2ja3k30fwa8a8cm3dj"))))
82 (build-system gnu-build-system)
83 (inputs
84 `(;; TODO: Add these optional dependencies.
85 ;; ("libX11" ,libX11)
86 ;; ("xproto" ,xproto)
87 ;; ("tk" ,tk)
88 ("tcl" ,tcl)))
89 (arguments
90 '(#:configure-flags
91 (list (string-append "--with-tcl="
92 (assoc-ref %build-inputs "tcl")
93 "/lib")
94 (string-append "--with-tclinclude="
95 (assoc-ref %build-inputs "tcl")
96 "/include")
97 (string-append "--exec-prefix="
98 (assoc-ref %outputs "out")))
99
100 #:phases (alist-cons-before
101 'configure 'set-path-to-stty
102 (lambda _
103 (substitute* "configure"
104 (("STTY_BIN=/bin/stty")
105 (string-append "STTY_BIN=" (which "stty")))))
106 %standard-phases)
107
108 #:test-target "test"))
109 (home-page "http://expect.nist.gov/")
110 (synopsis
111 "A tool for automating interactive applications")
112 (description
113 "Expect is a tool for automating interactive applications such as
114 telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this
115 stuff trivial. Expect is also useful for testing these same
116 applications. And by adding Tk, you can wrap interactive applications in
117 X11 GUIs.")
118 (license public-domain))) ; as written in `license.terms'
119
120 (define-public tk
121 (package
122 (name "tk")
123 (version "8.6.0")
124 (source (origin
125 (method url-fetch)
126 (uri (string-append "mirror://sourceforge/tcl/Tcl/"
127 version "/tk" version "-src.tar.gz"))
128 (sha256
129 (base32
130 "1rld0l7p1h31z488w44j170jpsm11xsjf2qrb7gid2b5dwmqnw2w"))))
131 (build-system gnu-build-system)
132 (arguments
133 '(#:phases (alist-cons-before
134 'configure 'pre-configure
135 (lambda _
136 (chdir "unix"))
137 %standard-phases)
138
139 #:configure-flags (list (string-append "--with-tcl="
140 (assoc-ref %build-inputs "tcl")
141 "/lib"))
142
143 ;; The tests require a running X server, so we just skip them.
144 #:tests? #f))
145 (inputs `(("tcl" ,tcl)))
146
147 ;; tk.h refers to X11 headers, hence the propagation.
148 (propagated-inputs `(("libx11" ,libx11)
149 ("libxext" ,libxext)))
150
151 (home-page "http://www.tcl.tk/")
152 (synopsis "Graphical user interface toolkit for Tcl")
153 (description
154 "Tk is a graphical toolkit for building graphical user interfaces
155 (GUIs) in the Tcl language.")
156 (license (package-license tcl))))