Commit | Line | Data |
---|---|---|
4a219a1a LC |
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 | ||
1ffa7090 | 19 | (define-module (gnu packages tcl) |
4a219a1a LC |
20 | #:use-module (guix packages) |
21 | #:use-module (guix download) | |
22 | #:use-module (guix build-system gnu) | |
23 | #:use-module (guix licenses)) | |
24 | ||
25 | (define-public tcl | |
26 | (package | |
27 | (name "tcl") | |
28 | (version "8.6.0") | |
29 | (source | |
30 | (origin | |
31 | (method url-fetch) | |
32 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
33 | version "/tcl" version "-src.tar.gz")) | |
34 | (sha256 | |
35 | (base32 | |
36 | "1pnabp3xsja4rc8c01l9q1avb65a3zhdzci3j54qa5krqjwj4i1m")))) | |
37 | (build-system gnu-build-system) | |
38 | (arguments | |
39 | '(#:phases (alist-cons-before | |
40 | 'configure 'pre-configure | |
41 | (lambda _ | |
42 | (chdir "unix")) | |
43 | (alist-cons-after | |
44 | 'install 'install-private-headers | |
3465eb03 | 45 | (lambda* (#:key outputs #:allow-other-keys) |
4a219a1a | 46 | ;; Private headers are needed by Expect. |
3465eb03 LC |
47 | (and (zero? (system* "make" |
48 | "install-private-headers")) | |
49 | (let ((bin (string-append (assoc-ref outputs "out") | |
50 | "/bin"))) | |
51 | ;; Create a tclsh -> tclsh8.6 symlink. | |
52 | ;; Programs such as Ghostscript rely on it. | |
53 | (with-directory-excursion bin | |
54 | (symlink (car (find-files "." "tclsh")) | |
55 | "tclsh"))))) | |
4a219a1a | 56 | %standard-phases)) |
eb6d676e LC |
57 | |
58 | ;; XXX: There are a few test failures (related to HTTP, most | |
59 | ;; likely related to name resolution), but that doesn't cause | |
60 | ;; `make' to fail. | |
61 | #:test-target "test")) | |
4a219a1a LC |
62 | (home-page "http://www.tcl.tk/") |
63 | (synopsis "The Tcl scripting language") | |
64 | (description "The Tcl (Tool Command Language) scripting language.") | |
65 | (license (bsd-style "http://www.tcl.tk/software/tcltk/license.html" | |
66 | "Tcl/Tk license")))) | |
67 | ||
68 | ||
69 | (define-public expect | |
70 | (package | |
71 | (name "expect") | |
72 | (version "5.45") | |
73 | (source | |
74 | (origin | |
75 | (method url-fetch) | |
76 | (uri (string-append "mirror://sourceforge/expect/Expect/" | |
77 | version "/expect" version ".tar.gz")) | |
78 | (sha256 | |
79 | (base32 | |
80 | "0h60bifxj876afz4im35rmnbnxjx4lbdqp2ja3k30fwa8a8cm3dj")))) | |
81 | (build-system gnu-build-system) | |
82 | (inputs | |
83 | `(;; TODO: Add these optional dependencies. | |
84 | ;; ("libX11" ,libX11) | |
85 | ;; ("xproto" ,xproto) | |
86 | ;; ("tk" ,tk) | |
87 | ("tcl" ,tcl))) | |
88 | (arguments | |
89 | '(#:configure-flags | |
90 | (list (string-append "--with-tcl=" | |
91 | (assoc-ref %build-inputs "tcl") | |
92 | "/lib") | |
93 | (string-append "--with-tclinclude=" | |
94 | (assoc-ref %build-inputs "tcl") | |
95 | "/include") | |
96 | (string-append "--exec-prefix=" | |
97 | (assoc-ref %outputs "out"))) | |
eb6d676e | 98 | |
d5529a91 LC |
99 | #:phases (alist-cons-before |
100 | 'configure 'set-path-to-stty | |
101 | (lambda _ | |
102 | (substitute* "configure" | |
103 | (("STTY_BIN=/bin/stty") | |
104 | (string-append "STTY_BIN=" (which "stty"))))) | |
105 | %standard-phases) | |
106 | ||
eb6d676e | 107 | #:test-target "test")) |
4a219a1a LC |
108 | (home-page "http://expect.nist.gov/") |
109 | (synopsis | |
110 | "A tool for automating interactive applications") | |
111 | (description | |
112 | "Expect is a tool for automating interactive applications such as | |
113 | telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this | |
114 | stuff trivial. Expect is also useful for testing these same | |
115 | applications. And by adding Tk, you can wrap interactive applications in | |
116 | X11 GUIs.") | |
117 | (license public-domain))) ; as written in `license.terms' |