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