Commit | Line | Data |
---|---|---|
4a219a1a | 1 | ;;; GNU Guix --- Functional package management for GNU |
9b1bf330 | 2 | ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
6fea8ade | 3 | ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org> |
de0c3141 | 4 | ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> |
49b92a24 | 5 | ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il> |
50fe318c | 6 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> |
3c8ba11a | 7 | ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net> |
9cc03bbf | 8 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
4a219a1a LC |
9 | ;;; |
10 | ;;; This file is part of GNU Guix. | |
11 | ;;; | |
12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
13 | ;;; under the terms of the GNU General Public License as published by | |
14 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
15 | ;;; your option) any later version. | |
16 | ;;; | |
17 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ;;; GNU General Public License for more details. | |
21 | ;;; | |
22 | ;;; You should have received a copy of the GNU General Public License | |
23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
24 | ||
1ffa7090 | 25 | (define-module (gnu packages tcl) |
4a219a1a LC |
26 | #:use-module (guix packages) |
27 | #:use-module (guix download) | |
49b92a24 | 28 | #:use-module (guix utils) |
4a219a1a | 29 | #:use-module (guix build-system gnu) |
de0c3141 | 30 | #:use-module (guix build-system perl) |
f5ea273a | 31 | #:use-module (gnu packages) |
e55354b8 | 32 | #:use-module (gnu packages image) |
c3aeac38 | 33 | #:use-module (gnu packages fontutils) |
de0c3141 EB |
34 | #:use-module (gnu packages perl) |
35 | #:use-module (gnu packages pkg-config) | |
511539ae | 36 | #:use-module (gnu packages xml) |
765904ce | 37 | #:use-module (gnu packages xorg) |
4a219a1a LC |
38 | #:use-module (guix licenses)) |
39 | ||
40 | (define-public tcl | |
41 | (package | |
42 | (name "tcl") | |
61565a5f | 43 | (version "8.6.8") |
f8e7fdc4 LC |
44 | (source (origin |
45 | (method url-fetch) | |
46 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
47 | version "/tcl" version "-src.tar.gz")) | |
48 | (sha256 | |
49 | (base32 | |
61565a5f | 50 | "0sprsg7wnraa4cbwgbcliylm6p0rspfymxn8ww02pr4ca70v0g64")))) |
4a219a1a LC |
51 | (build-system gnu-build-system) |
52 | (arguments | |
1004a92c MB |
53 | '(#:phases (modify-phases %standard-phases |
54 | (add-before 'configure 'pre-configure | |
55 | (lambda _ (chdir "unix") #t)) | |
56 | (add-after 'install 'install-private-headers | |
57 | (lambda* (#:key outputs #:allow-other-keys) | |
58 | ;; Private headers are needed by Expect. | |
6fea8ade MW |
59 | (invoke "make" "install-private-headers") |
60 | (let ((bin (string-append (assoc-ref outputs "out") | |
61 | "/bin"))) | |
62 | ;; Create a tclsh -> tclsh8.6 symlink. | |
63 | ;; Programs such as Ghostscript rely on it. | |
64 | (with-directory-excursion bin | |
65 | (symlink (car (find-files "." "tclsh")) | |
66 | "tclsh")) | |
67 | #t)))) | |
eb6d676e | 68 | |
c9a46555 MW |
69 | ;; By default, man pages are put in PREFIX/man, but we want them in |
70 | ;; PREFIX/share/man. The 'validate-documentation-location' phase is | |
71 | ;; not able to fix this up because the default install populates both | |
72 | ;; PREFIX/man and PREFIX/share/man. | |
73 | #:configure-flags (list (string-append "--mandir=" | |
74 | (assoc-ref %outputs "out") | |
75 | "/share/man")) | |
76 | ||
eb6d676e LC |
77 | ;; XXX: There are a few test failures (related to HTTP, most |
78 | ;; likely related to name resolution), but that doesn't cause | |
79 | ;; `make' to fail. | |
80 | #:test-target "test")) | |
4a219a1a LC |
81 | (home-page "http://www.tcl.tk/") |
82 | (synopsis "The Tcl scripting language") | |
83 | (description "The Tcl (Tool Command Language) scripting language.") | |
e4c38581 | 84 | (license tcl/tk))) |
4a219a1a LC |
85 | |
86 | ||
87 | (define-public expect | |
88 | (package | |
89 | (name "expect") | |
9cc03bbf | 90 | (version "5.45.4") |
4a219a1a LC |
91 | (source |
92 | (origin | |
93 | (method url-fetch) | |
94 | (uri (string-append "mirror://sourceforge/expect/Expect/" | |
95 | version "/expect" version ".tar.gz")) | |
96 | (sha256 | |
97 | (base32 | |
9cc03bbf | 98 | "0d1cp5hggjl93xwc8h1y6adbnrvpkk0ywkd00inz9ndxn21xm9s9")))) |
4a219a1a LC |
99 | (build-system gnu-build-system) |
100 | (inputs | |
101 | `(;; TODO: Add these optional dependencies. | |
102 | ;; ("libX11" ,libX11) | |
6a6db57f | 103 | ;; ("xorgproto" ,xorgproto) |
4a219a1a LC |
104 | ;; ("tk" ,tk) |
105 | ("tcl" ,tcl))) | |
106 | (arguments | |
107 | '(#:configure-flags | |
988cecfd MW |
108 | (let ((out (assoc-ref %outputs "out")) |
109 | (tcl (assoc-ref %build-inputs "tcl"))) | |
110 | (list (string-append "--with-tcl=" tcl "/lib") | |
111 | (string-append "--with-tclinclude=" tcl "/include") | |
112 | (string-append "--exec-prefix=" out) | |
113 | (string-append "--mandir=" out "/share/man"))) | |
eb6d676e | 114 | |
dc1d3cde KK |
115 | #:phases |
116 | (modify-phases %standard-phases | |
117 | (add-before 'configure 'set-path-to-stty | |
118 | (lambda _ | |
119 | (substitute* "configure" | |
120 | (("STTY_BIN=/bin/stty") | |
121 | (string-append "STTY_BIN=" (which "stty")))) | |
122 | #t))) | |
d5529a91 | 123 | |
eb6d676e | 124 | #:test-target "test")) |
ad549242 | 125 | (home-page "http://expect.sourceforge.net/") |
9e771e3b | 126 | (synopsis "Tool for automating interactive applications") |
4a219a1a LC |
127 | (description |
128 | "Expect is a tool for automating interactive applications such as | |
129 | telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this | |
35b9e423 EB |
130 | stuff trivial. Expect is also useful for testing these same |
131 | applications. And by adding Tk, you can wrap interactive applications in | |
4a219a1a LC |
132 | X11 GUIs.") |
133 | (license public-domain))) ; as written in `license.terms' | |
765904ce LC |
134 | |
135 | (define-public tk | |
136 | (package | |
137 | (name "tk") | |
61565a5f | 138 | (version "8.6.8") |
765904ce LC |
139 | (source (origin |
140 | (method url-fetch) | |
141 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
142 | version "/tk" version "-src.tar.gz")) | |
143 | (sha256 | |
144 | (base32 | |
61565a5f | 145 | "0cvvznjwfn0i9vj9cw3wg8svx25ha34gg57m4xd1k5fyinhbrrs9")) |
fc1adab1 | 146 | (patches (search-patches "tk-find-library.patch")))) |
765904ce LC |
147 | (build-system gnu-build-system) |
148 | (arguments | |
49b92a24 | 149 | `(#:phases (modify-phases %standard-phases |
c3aeac38 LC |
150 | (add-before |
151 | 'configure 'pre-configure | |
152 | (lambda _ | |
eed6985f MW |
153 | (chdir "unix") |
154 | #t)) | |
49b92a24 EF |
155 | (add-after |
156 | 'install 'create-wish-symlink | |
157 | (lambda* (#:key outputs #:allow-other-keys) | |
158 | (let ((out (assoc-ref outputs "out"))) | |
159 | (symlink (string-append out "/bin/wish" | |
160 | ,(version-major+minor | |
161 | (package-version tk))) | |
162 | (string-append out "/bin/wish"))) | |
163 | #t)) | |
c3aeac38 LC |
164 | (add-after |
165 | 'install 'add-fontconfig-flag | |
166 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
167 | ;; Add the missing -L flag for Fontconfig in 'tk.pc' and | |
168 | ;; 'tkConfig.sh'. | |
169 | (let ((out (assoc-ref outputs "out")) | |
170 | (fontconfig (assoc-ref inputs "fontconfig"))) | |
171 | (substitute* (find-files out | |
172 | "^(tkConfig\\.sh|tk\\.pc)$") | |
173 | (("-lfontconfig") | |
174 | (string-append "-L" fontconfig | |
175 | "/lib -lfontconfig"))) | |
176 | #t)))) | |
765904ce LC |
177 | |
178 | #:configure-flags (list (string-append "--with-tcl=" | |
179 | (assoc-ref %build-inputs "tcl") | |
180 | "/lib")) | |
181 | ||
182 | ;; The tests require a running X server, so we just skip them. | |
183 | #:tests? #f)) | |
8a0263f1 SB |
184 | (native-inputs `(("pkg-config" ,pkg-config))) |
185 | (inputs `(("libxft" ,libxft) | |
c3aeac38 | 186 | ("fontconfig" ,fontconfig) |
8a0263f1 | 187 | ("tcl" ,tcl))) |
765904ce LC |
188 | ;; tk.h refers to X11 headers, hence the propagation. |
189 | (propagated-inputs `(("libx11" ,libx11) | |
190 | ("libxext" ,libxext))) | |
191 | ||
49b92a24 | 192 | (home-page "https://www.tcl.tk/") |
765904ce LC |
193 | (synopsis "Graphical user interface toolkit for Tcl") |
194 | (description | |
cb150ca3 LC |
195 | "Tk is a graphical toolkit for building graphical user |
196 | interfaces (GUIs) in the Tcl language.") | |
765904ce | 197 | (license (package-license tcl)))) |
de0c3141 EB |
198 | |
199 | (define-public perl-tk | |
200 | (package | |
201 | (name "perl-tk") | |
b1c699c4 | 202 | (version "804.034") |
de0c3141 EB |
203 | (source (origin |
204 | (method url-fetch) | |
205 | (uri (string-append | |
206 | "mirror://cpan/authors/id/S/SR/SREZIC/Tk-" | |
207 | version ".tar.gz")) | |
208 | (sha256 | |
209 | (base32 | |
b1c699c4 | 210 | "1qiz55dmw7hm1wgpjdzf2jffwcj0hisr3kf80qi8lli3qx2b39py")))) |
de0c3141 EB |
211 | (build-system perl-build-system) |
212 | (native-inputs `(("pkg-config" ,pkg-config))) | |
213 | (inputs `(("libx11" ,libx11) | |
214 | ("libpng" ,libpng) | |
215 | ("libjpeg" ,libjpeg))) | |
216 | (arguments | |
217 | `(#:make-maker-flags `(,(string-append | |
cb150ca3 LC |
218 | "X11=" (assoc-ref %build-inputs "libx11"))) |
219 | ||
220 | ;; Fails to build in parallel: <http://bugs.gnu.org/18262>. | |
221 | #:parallel-build? #f)) | |
de0c3141 EB |
222 | (synopsis "Graphical user interface toolkit for Perl") |
223 | (description | |
224 | "Tk is a Graphical User Interface ToolKit.") | |
9aba9b12 | 225 | (home-page "https://metacpan.org/release/Tk") |
de0c3141 EB |
226 | ;; From the package README: "... you can redistribute it and/or modify it |
227 | ;; under the same terms as Perl itself, with the exception of all the | |
228 | ;; files in the pTk sub-directory which have separate terms derived from | |
229 | ;; those of the orignal Tix4.1.3 or Tk8.4.* sources. See the files | |
230 | ;; pTk/license.terms, pTk/license.html_lib, and pTk/Tix.license for | |
231 | ;; details of this license." | |
2f3108ad | 232 | (license perl-license))) |
50fe318c JN |
233 | |
234 | (define-public tcllib | |
235 | (package | |
236 | (name "tcllib") | |
345eec82 | 237 | (version "1.19") |
50fe318c JN |
238 | (source (origin |
239 | (method url-fetch) | |
f86f1531 TGR |
240 | (uri (string-append "mirror://sourceforge/tcllib/tcllib/" |
241 | version "/tcllib-" version ".tar.gz")) | |
50fe318c JN |
242 | (sha256 |
243 | (base32 | |
345eec82 | 244 | "173abxaazdmf210v651708ab6h7xhskvd52krxk6ifam337qgzh1")))) |
50fe318c JN |
245 | (build-system gnu-build-system) |
246 | (native-inputs | |
247 | `(("tcl" ,tcl))) | |
248 | (native-search-paths | |
249 | (list (search-path-specification | |
250 | (variable "TCLLIBPATH") | |
251 | (separator " ") | |
252 | (files (list (string-append "lib/tcllib" version)))))) | |
253 | (home-page "https://core.tcl.tk/tcllib/home") | |
254 | (synopsis "Standard Tcl Library") | |
255 | (description "Tcllib, the standard Tcl library, is a collection of common | |
256 | utility functions and modules all written in high-level Tcl.") | |
257 | (license (package-license tcl)))) | |
511539ae | 258 | |
1966481f DM |
259 | (define-public tklib |
260 | (package | |
261 | (name "tklib") | |
262 | (version "0.6") | |
263 | (source (origin | |
264 | (method url-fetch) | |
265 | (uri (string-append "https://core.tcl.tk/tklib/tarball/tklib-" | |
266 | version ".tar.gz?uuid=tklib-0-6")) | |
267 | (sha256 | |
268 | (base32 | |
269 | "03y0bzgwbh7nnyqkh8n00bbkq2fyblq39s3bdb6mawna0bbn0wwg")))) | |
270 | (build-system gnu-build-system) | |
271 | (native-inputs | |
272 | `(("tcl" ,tcl))) | |
273 | (propagated-inputs | |
274 | `(("tcllib" ,tcllib) | |
275 | ("tk" ,tk))) ; for "wish" | |
276 | (native-search-paths | |
277 | (list (search-path-specification | |
278 | (variable "TCLLIBPATH") | |
279 | (separator " ") | |
280 | (files (list (string-append "lib/tklib" version)))))) | |
281 | (home-page "https://www.tcl.tk/software/tklib/") | |
282 | (synopsis "Tk utility modules for Tcl") | |
283 | (description "Tklib is a collection of common utility functions and | |
284 | modules for Tk, all written in high-level Tcl. Examples of provided widgets: | |
285 | @enumerate | |
286 | @item @code{chatwidget} | |
287 | @item @code{datefield} | |
958be7a4 | 288 | @item @code{tooltip} |
1966481f DM |
289 | @item @code{cursor} |
290 | @item @code{ipentry} | |
291 | @item @code{tablelist} | |
292 | @item @code{history} | |
293 | @item @code{tkpiechart} | |
294 | @item @code{ico} | |
295 | @item @code{crosshair} | |
296 | @item @code{ntext} | |
297 | @item @code{plotchart} | |
298 | @item @code{ctext} | |
299 | @item @code{autosscroll} | |
300 | @item @code{canvas} | |
eb52d637 | 301 | @end enumerate") |
1966481f DM |
302 | (license (package-license tcl)))) |
303 | ||
511539ae JN |
304 | (define-public tclxml |
305 | (package | |
306 | (name "tclxml") | |
307 | (version "3.2") | |
308 | (source (origin | |
309 | (method url-fetch) | |
de67e922 LF |
310 | (uri (string-append "mirror://sourceforge/" name "/TclXML/" |
311 | version "/" name "-" version ".tar.gz")) | |
511539ae JN |
312 | (sha256 |
313 | (base32 | |
314 | "0ffb4aw63inig3aql33g4pk0kjk14dv238anp1scwjdjh1k6n4gl")) | |
fc1adab1 | 315 | (patches (search-patches "tclxml-3.2-install.patch")))) |
511539ae JN |
316 | (build-system gnu-build-system) |
317 | (native-inputs | |
318 | `(("tcl" ,tcl) | |
511539ae JN |
319 | ("libxml2" ,libxml2) |
320 | ("libxslt" ,libxslt))) | |
bc01c891 DM |
321 | (propagated-inputs |
322 | `(("tcllib" ,tcllib))) ; uri | |
511539ae JN |
323 | (native-search-paths |
324 | (list (search-path-specification | |
325 | (variable "TCLLIBPATH") | |
326 | (separator " ") | |
327 | (files (list (string-append "lib/Tclxml" version)))))) | |
328 | (arguments | |
329 | `(#:configure-flags | |
330 | (list (string-append "--exec-prefix=" (assoc-ref %outputs "out")) | |
331 | (string-append "--with-tclconfig=" | |
332 | (assoc-ref %build-inputs "tcl") "/lib") | |
333 | (string-append "--with-xml2-config=" | |
334 | (assoc-ref %build-inputs "libxml2") | |
335 | "/bin/xml2-config") | |
336 | (string-append "--with-xslt-config=" | |
337 | (assoc-ref %build-inputs "libxslt") | |
338 | "/bin/xslt-config")) | |
339 | #:test-target "test")) | |
340 | (home-page "http://tclxml.sourceforge.net/") | |
341 | (synopsis "Tcl library for XML parsing") | |
342 | (description "TclXML provides event-based parsing of XML documents. The | |
343 | application may register callback scripts for certain document features, and | |
344 | when the parser encounters those features while parsing the document the | |
345 | callback is evaluated.") | |
346 | (license (non-copyleft | |
347 | "file://LICENCE" | |
348 | "See LICENCE in the distribution.")))) | |
0ef83ec9 KK |
349 | |
350 | (define-public tclx | |
351 | (package | |
352 | (name "tclx") | |
353 | (version "8.4.1") | |
354 | (source (origin | |
355 | (method url-fetch) | |
356 | (uri (string-append "mirror://sourceforge/tclx/TclX/" | |
357 | version "/tclx" version ".tar.bz2")) | |
358 | (sha256 | |
359 | (base32 | |
360 | "1v2qwzzidz0is58fd1p7wfdbscxm3ip2wlbqkj5jdhf6drh1zd59")))) | |
361 | (build-system gnu-build-system) | |
362 | (arguments | |
363 | '(#:tests? #f ; a test named profile.test segfaults | |
364 | #:configure-flags (list (string-append "--with-tcl=" | |
365 | (assoc-ref %build-inputs "tcl") | |
366 | "/lib") | |
367 | (string-append "--libdir=" | |
368 | (assoc-ref %outputs "out") | |
369 | "/lib")))) | |
370 | (inputs | |
371 | `(("tcl" ,tcl) | |
372 | ("tk" ,tk))) | |
373 | (home-page "http://tclx.sourceforge.net/") | |
374 | (synopsis "System programming extensions for Tcl") | |
375 | (description | |
376 | "Extended Tcl is oriented towards system programming tasks and large | |
377 | application development. TclX provides additional interfaces to the operating | |
378 | system, and adds many new programming constructs, text manipulation tools, and | |
379 | debugging tools.") | |
380 | (license tcl/tk))) |