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