1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
33 (uri (string-append "mirror://sourceforge/tcl/Tcl/"
34 version "/tcl" version "-src.tar.gz"))
37 "1pnabp3xsja4rc8c01l9q1avb65a3zhdzci3j54qa5krqjwj4i1m"))))
38 (build-system gnu-build-system)
40 '(#:phases (alist-cons-before
41 'configure 'pre-configure
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")
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"))
59 ;; XXX: There are a few test failures (related to HTTP, most
60 ;; likely related to name resolution), but that doesn't cause
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"
77 (uri (string-append "mirror://sourceforge/expect/Expect/"
78 version "/expect" version ".tar.gz"))
81 "0h60bifxj876afz4im35rmnbnxjx4lbdqp2ja3k30fwa8a8cm3dj"))))
82 (build-system gnu-build-system)
84 `(;; TODO: Add these optional dependencies.
91 (list (string-append "--with-tcl="
92 (assoc-ref %build-inputs "tcl")
94 (string-append "--with-tclinclude="
95 (assoc-ref %build-inputs "tcl")
97 (string-append "--exec-prefix="
98 (assoc-ref %outputs "out")))
100 #:phases (alist-cons-before
101 'configure 'set-path-to-stty
103 (substitute* "configure"
104 (("STTY_BIN=/bin/stty")
105 (string-append "STTY_BIN=" (which "stty")))))
108 #:test-target "test"))
109 (home-page "http://expect.nist.gov/")
111 "A tool for automating interactive applications")
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
118 (license public-domain))) ; as written in `license.terms'
126 (uri (string-append "mirror://sourceforge/tcl/Tcl/"
127 version "/tk" version "-src.tar.gz"))
130 "1rld0l7p1h31z488w44j170jpsm11xsjf2qrb7gid2b5dwmqnw2w"))))
131 (build-system gnu-build-system)
133 '(#:phases (alist-cons-before
134 'configure 'pre-configure
139 #:configure-flags (list (string-append "--with-tcl="
140 (assoc-ref %build-inputs "tcl")
143 ;; The tests require a running X server, so we just skip them.
145 (inputs `(("tcl" ,tcl)))
147 ;; tk.h refers to X11 headers, hence the propagation.
148 (propagated-inputs `(("libx11" ,libx11)
149 ("libxext" ,libxext)))
151 (home-page "http://www.tcl.tk/")
152 (synopsis "Graphical user interface toolkit for Tcl")
154 "Tk is a graphical toolkit for building graphical user interfaces
155 (GUIs) in the Tcl language.")
156 (license (package-license tcl))))