projects/guix·blob python-team · refs

613 lines · 24.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès <[email protected]>
3;;; Copyright © 2014 Eric Bavier <[email protected]>
4;;; Copyright © 2014, 2015, 2018 Mark H Weaver <[email protected]>
5;;; Copyright © 2016 David Craven <[email protected]>
6;;; Copyright © 2016, 2018, 2020 Efraim Flashner <[email protected]>
7;;; Copyright © 2016, 2023, 2024, 2026 Janneke Nieuwenhuizen <[email protected]>
8;;; Copyright © 2017 Kei Kebreau <[email protected]>
9;;; Copyright © 2018, 2020, 2022 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2019 Julien Lepiller <[email protected]>
11;;; Copyright © 2019 Mathieu Othacehe <[email protected]>
12;;; Copyright © 2026 Dariqq <[email protected]>
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages tcl)
30 #:use-module (guix gexp)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix utils)
35 #:use-module (guix build-system copy)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system go)
38 #:use-module (guix build-system perl)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages admin)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages build-tools)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages gcc)
46 #:use-module (gnu packages image)
47 #:use-module (gnu packages perl)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages readline)
50 #:use-module (gnu packages tls)
51 #:use-module (gnu packages xml)
52 #:use-module (gnu packages xorg)
53 #:use-module (srfi srfi-1))
54
55(define-public tcl
56 (package
57 (name "tcl")
58 (version "8.6.12")
59 (source (origin
60 (method url-fetch)
61 (uri (string-append "mirror://sourceforge/tcl/Tcl/"
62 version "/tcl" version "-src.tar.gz"))
63 (sha256
64 (base32
65 "19n1wk6ypx19p26gywvibwbhqs2zapp93n3136qlhzhn1zfrbj96"))))
66 (build-system gnu-build-system)
67 (arguments
68 `(#:phases (modify-phases %standard-phases
69 (add-before 'configure 'pre-configure
70 (lambda _ (chdir "unix")))
71 (add-after 'install 'install-private-headers
72 (lambda* (#:key outputs #:allow-other-keys)
73 ;; Private headers are needed by Expect.
74 (invoke "make" "install-private-headers")
75 (let ((bin (string-append (assoc-ref outputs "out")
76 "/bin")))
77 ;; Create a tclsh -> tclsh8.6 symlink.
78 ;; Programs such as Ghostscript rely on it.
79 (with-directory-excursion bin
80 (symlink (car (find-files "." "tclsh"))
81 "tclsh")))))
82 ,@(if (system-hurd?)
83 '((add-after 'unpack 'delete-tests
84 (lambda _
85 (delete-file "tests/chanio.test")
86 (delete-file "tests/socket.test"))))
87 '()))
88
89 ;; By default, man pages are put in PREFIX/man, but we want them in
90 ;; PREFIX/share/man. The 'validate-documentation-location' phase is
91 ;; not able to fix this up because the default install populates both
92 ;; PREFIX/man and PREFIX/share/man.
93 #:configure-flags
94 (list (string-append "--mandir="
95 (assoc-ref %outputs "out")
96 "/share/man")
97 ;; This is needed when cross-compiling, see:
98 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247
99 ,@(if (%current-target-system)
100 '("tcl_cv_strtod_buggy=1"
101 "ac_cv_func_strtod=yes")
102 '()))
103
104 ;; XXX: There are a few test failures (related to HTTP, most
105 ;; likely related to name resolution), but that doesn't cause
106 ;; `make' to fail.
107 #:test-target "test"))
108 (home-page "https://www.tcl.tk/")
109 (synopsis "The Tcl scripting language")
110 (description "The Tcl (Tool Command Language) scripting language.")
111 (license license:tcl/tk)))
112
113(define-public itcl
114 (package
115 (name "itcl")
116 (version "4.2.2")
117 (source
118 (origin
119 (method url-fetch)
120 (uri (string-append
121 "mirror://sourceforge/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/itcl%20"
122 version "/itcl" version ".tar.gz"))
123 (file-name (string-append "incrtcl-" version ".tar.gz"))
124 (sha256
125 (base32 "0v0m1s3rlsbg7p366i6m5zcvnmixnch87jmczidjanqvmw76fk5c"))))
126 (build-system gnu-build-system)
127 (arguments
128 (list #:configure-flags
129 #~(list
130 (string-append "--exec-prefix=" #$output)
131 (string-append "--with-tclinclude="
132 (assoc-ref %build-inputs "tcl") "/include")
133 (string-append "--with-tcl="
134 (assoc-ref %build-inputs "tcl") "/lib"))
135 #:test-target "test"
136 #:phases
137 #~(modify-phases %standard-phases
138 (add-after 'install 'clean-up-bin-and-lib
139 (lambda _
140 ;; NOTE: (Sharlatan-20210213T204336+0000): libraries appearer in
141 ;; "out/lib/itcl{{version}}" and there are no binaries, some extra
142 ;; rename and remove spells are to be applied.
143 (rmdir (string-append #$output "/bin"))
144 (rename-file (string-append #$output "/lib/itcl" #$version)
145 (string-append #$output "/libtmp"))
146 (rename-file (string-append #$output "/libtmp")
147 (string-append #$output "/lib")))))))
148 (native-inputs
149 (list tcl))
150 (inputs
151 (list tcllib))
152 (home-page "https://incrtcl.sourceforge.net/")
153 (synopsis "Object Oriented programming (OOP) extension for Tcl")
154 (description
155 "[incr Tcl] is a widely used object-oriented system for Tcl. The name is
156a play on C++, and [incr Tcl] provides a similar object model, including
157multiple inheritance and public and private classes and variables.")
158 (license license:public-domain)))
159
160(define-public jimtcl-boot0
161 (hidden-package
162 (package
163 (name "jimtcl-boot0")
164 (version "0.84")
165 (source
166 (origin
167 (method git-fetch)
168 (uri (git-reference
169 (url "https://github.com/msteveb/jimtcl")
170 (commit version)))
171 (file-name (git-file-name "jimtcl" version))
172 (sha256
173 (base32
174 "14f9gpvbmbwax5068bgrp99lacrla433f5sv7z7ix6nccgrh5yrj"))
175 (modules '((guix build utils)))
176 (snippet
177 #~(begin
178 ;; INFO: the configure script and a lot of files inside
179 ;; autosetup directory are generated by the autosetup package.
180 ;; Let's remove them; they are needed only
181 ;; in self-contained installations.
182 (delete-file "configure")
183 (delete-all-but "autosetup" "jim-misc.auto" "local.tcl")))))
184 (build-system copy-build-system)
185 (arguments
186 (list
187 #:install-plan
188 #~'(("jimsh" "bin/jimsh"))
189 #:phases
190 #~(modify-phases %standard-phases
191 (add-before 'install 'build
192 (lambda _
193 ;; INFO: the output of ./make-bootstrap-jim should not
194 ;; overwrite any existent file, especially jimsh.c.
195 ;; TODO: use pipeline.
196 (invoke "sh" "-c" "./make-bootstrap-jim >> jimsh-0.c")
197 (invoke #$(cc-for-target)
198 "-g" "-O2" "-o" "jimsh" "jimsh-0.c"))))))
199 (home-page "http://jim.tcl.tk/index.html")
200 (synopsis "Bootstrap Jim Tcl")
201 (description
202 "This package bootstrap Jim Tcl for use in Autosetup,
203which is used in Jim's build configuration.")
204 (license license:bsd-2))))
205
206(define-public jimtcl
207 (package/inherit jimtcl-boot0
208 (name "jimtcl")
209 (build-system gnu-build-system)
210 (arguments
211 (list #:phases
212 #~(modify-phases %standard-phases
213 (replace 'configure
214 (lambda _
215 (invoke "autosetup"
216 (string-append "--prefix=" #$output))))
217 (add-before 'check 'delete-failing-tests
218 (lambda _
219 ;; INFO: tests/ssl.test requires internet access.
220 (delete-file "tests/ssl.test")))
221 #$@(if (target-32bit?)
222 #~((add-after 'unpack 'delete-failing-tests/32bit
223 (lambda _
224 (delete-file "tests/file.test"))))
225 #~()))))
226 (inputs (list openssl))
227 (native-inputs
228 (list autosetup-boot0
229 ;; INFO: tests/posix.test require hostname, provided by inetutils.
230 inetutils))
231 (synopsis "Small footprint Tcl implementation")
232 (description "Jim is a small footprint implementation of the Tcl programming
233language.")
234 (properties (alist-delete 'hidden? (package-properties jimtcl-boot0)))))
235
236(define-public expect
237 (package
238 (name "expect")
239 (version "5.45.4")
240 (source
241 (origin
242 (method url-fetch)
243 (uri (string-append "mirror://sourceforge/expect/Expect/"
244 version "/expect" version ".tar.gz"))
245 (sha256
246 (base32
247 "0d1cp5hggjl93xwc8h1y6adbnrvpkk0ywkd00inz9ndxn21xm9s9"))))
248 (build-system gnu-build-system)
249 (inputs
250 (list ;; TODO: Add these optional dependencies.
251 ;; ("libX11" ,libX11)
252 ;; ("xorgproto" ,xorgproto)
253 ;; ("tk" ,tk)
254 tcl))
255 (arguments
256 '(#:configure-flags
257 (let ((out (assoc-ref %outputs "out"))
258 (tcl (assoc-ref %build-inputs "tcl")))
259 (list (string-append "CFLAGS=-g -O2"
260 " -Wno-error=implicit-function-declaration"
261 " -Wno-error=implicit-int"
262 " -Wno-error=incompatible-pointer-types")
263 (string-append "--with-tcl=" tcl "/lib")
264 (string-append "--with-tclinclude=" tcl "/include")
265 (string-append "--exec-prefix=" out)
266 (string-append "--mandir=" out "/share/man")))
267
268 #:phases
269 (modify-phases %standard-phases
270 (add-before 'configure 'set-path-to-stty
271 (lambda _
272 (substitute* "configure"
273 (("STTY_BIN=/bin/stty")
274 (string-append "STTY_BIN=" (which "stty"))))
275 #t)))
276
277 #:test-target "test"))
278 (home-page "https://core.tcl-lang.org/expect/")
279 (synopsis "Tool for automating interactive applications")
280 (description
281 "Expect is a tool for automating interactive applications such as
282telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this
283stuff trivial. Expect is also useful for testing these same
284applications. And by adding Tk, you can wrap interactive applications in
285X11 GUIs.")
286 (license license:public-domain))) ; as written in `license.terms'
287
288(define-public tk
289 (package
290 (name "tk")
291 (version "8.6.12")
292 (source (origin
293 (method url-fetch)
294 (uri (string-append "mirror://sourceforge/tcl/Tcl/"
295 (version-prefix version 3) "/tk"
296 version "-src.tar.gz"))
297 (sha256
298 (base32
299 "0c0665h9b55cr3p6civcrgaixx6dldz7k7v870lyssyb7wgmqf8j"))
300 (patches (search-patches "tk-find-library.patch"))))
301 (build-system gnu-build-system)
302 (arguments
303 (list
304 ;; The tests require a running X server, so we just skip them.
305 #:tests? #f
306 #:configure-flags
307 #~(list (string-append "--with-tcl="
308 (assoc-ref %build-inputs "tcl") "/lib")
309 ;; This is needed when cross-compiling, see:
310 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247
311 #$@(if (%current-target-system)
312 '("tcl_cv_strtod_buggy=1" "ac_cv_func_strtod=yes")
313 '()))
314 #:phases
315 #~(modify-phases %standard-phases
316 (add-before 'configure 'pre-configure
317 (lambda _
318 (chdir "unix")))
319 (add-after 'install 'create-wish-symlink
320 (lambda _
321 (let ((version #$(version-major+minor (package-version tk)))
322 (dest (string-append #$output "/bin/wish")))
323 (symlink (string-append dest version)
324 dest))))
325 (add-after 'install 'add-fontconfig-flag
326 (lambda* (#:key inputs outputs #:allow-other-keys)
327 ;; Add the missing -L flag for Fontconfig in 'tk.pc' and
328 ;; 'tkConfig.sh'.
329 (let ((fontconfig (search-input-file inputs
330 "lib/libfontconfig.so")))
331 (substitute* (find-files #$output "^(tkConfig\\.sh|tk\\.pc)$")
332 (("-lfontconfig")
333 (string-append "-L" (dirname fontconfig)
334 " -lfontconfig")))))))))
335 (native-inputs (list pkg-config))
336 (inputs (list libxft fontconfig tcl))
337 ;; tk.h refers to X11 headers, hence the propagation.
338 (propagated-inputs (list libx11 libxext))
339
340 (home-page "https://www.tcl.tk/")
341 (synopsis "Graphical user interface toolkit for Tcl")
342 (description
343 "Tk is a graphical toolkit for building graphical user
344interfaces (GUIs) in the Tcl language.")
345 (license (package-license tcl))))
346
347(define-public perl-tk
348 (package
349 (name "perl-tk")
350 (version "804.036")
351 (source (origin
352 (method url-fetch)
353 (uri (string-append
354 "mirror://cpan/authors/id/S/SR/SREZIC/Tk-"
355 version ".tar.gz"))
356 (sha256
357 (base32
358 "0pha40m97fzafjnq8vwkbi5sml6xv8jki6qi60rxrzmxlrqp5aij"))))
359 (build-system perl-build-system)
360 (native-inputs (list pkg-config))
361 (inputs (list gcc-12 libx11 libpng libjpeg-turbo))
362 (arguments
363 (list
364 #:make-maker-flags #~(list (string-append "X11=" #$libx11))
365 ;; Fails to build in parallel: <http://bugs.gnu.org/18262>.
366 #:parallel-build? #f))
367 (synopsis "Graphical user interface toolkit for Perl")
368 (description
369 "Tk is a Graphical User Interface ToolKit.")
370 (home-page "https://metacpan.org/release/Tk")
371 ;; From the package README: "... you can redistribute it and/or modify it
372 ;; under the same terms as Perl itself, with the exception of all the
373 ;; files in the pTk sub-directory which have separate terms derived from
374 ;; those of the original Tix4.1.3 or Tk8.4.* sources. See the files
375 ;; pTk/license.terms, pTk/license.html_lib, and pTk/Tix.license for
376 ;; details of this license."
377 (license license:perl-license)))
378
379(define-public tcllib
380 (package
381 (name "tcllib")
382 (version "1.19")
383 (source (origin
384 (method url-fetch)
385 (uri (string-append "mirror://sourceforge/tcllib/tcllib/"
386 version "/tcllib-" version ".tar.gz"))
387 (sha256
388 (base32
389 "173abxaazdmf210v651708ab6h7xhskvd52krxk6ifam337qgzh1"))))
390 (build-system gnu-build-system)
391 (native-inputs
392 (list tcl))
393 (native-search-paths
394 (list (search-path-specification
395 (variable "TCLLIBPATH")
396 (separator " ")
397 (files (list (string-append "lib/tcllib" version))))))
398 (home-page "https://core.tcl.tk/tcllib/home")
399 (synopsis "Standard Tcl Library")
400 (description "Tcllib, the standard Tcl library, is a collection of common
401utility functions and modules all written in high-level Tcl.")
402 (license (package-license tcl))))
403
404(define-public tclreadline
405 (package
406 (name "tclreadline")
407 (version "2.4.1")
408 (source
409 (origin
410 (method git-fetch)
411 (uri (git-reference
412 (url "https://github.com/flightaware/tclreadline")
413 (commit (string-append "v" version))))
414 (file-name (git-file-name name version))
415 (sha256
416 (base32
417 "0hpqiw6rppihax72n99xpi48jl1jdjygnipk477winr6q0k10lp8"))))
418 (build-system gnu-build-system)
419 (arguments
420 (list
421 #:phases
422 #~(modify-phases %standard-phases
423 ;; See README.Linux.
424 (add-before 'configure 'pre-config
425 (lambda _
426 (invoke "libtoolize" "--force" "--install" "--copy")
427 (invoke "aclocal")
428 (invoke "autoheader")
429 (invoke "automake" "--force-missing" "--add-missing" "--copy")
430 (invoke "autoconf"))))
431 #:configure-flags
432 #~(list (string-append "--with-tcl=" #$(this-package-input "tcl") "/lib")
433 (string-append "--with-tk=" #$(this-package-input "tk") "/lib")
434 (string-append "--with-readline-includes="
435 #$(this-package-input "readline")
436 "/include/readline"))))
437 (native-inputs
438 (list autoconf-2.71 automake libtool))
439 (inputs (list tcl tk readline))
440 (home-page "https://github.com/flightaware/tclreadline")
441 (synopsis "Readline support for Tcl")
442 (description
443 "Tclreadline provides @code{readline} support for interactive Tcl shells,
444including command-line editing, history, and completion.")
445 (license license:bsd-3)))
446
447(define-public tklib
448 (package
449 (name "tklib")
450 (version "0.6")
451 (source
452 (origin
453 (method url-fetch)
454 (uri (string-append "https://core.tcl.tk/tklib/tarball/tklib-"
455 version ".tar.gz?uuid=tklib-0-6"))
456 (file-name (string-append name "-" version ".tar.gz"))
457 (sha256
458 (base32 "03y0bzgwbh7nnyqkh8n00bbkq2fyblq39s3bdb6mawna0bbn0wwg"))))
459 (build-system gnu-build-system)
460 (native-inputs
461 (list tcl))
462 (propagated-inputs
463 (list tcllib tk)) ; for "wish"
464 (native-search-paths
465 (list (search-path-specification
466 (variable "TCLLIBPATH")
467 (separator " ")
468 (files (list (string-append "lib/tklib" version))))))
469 (home-page "https://www.tcl.tk/software/tklib/")
470 (synopsis "Tk utility modules for Tcl")
471 (description "Tklib is a collection of common utility functions and
472modules for Tk, all written in high-level Tcl. Examples of provided widgets:
473@enumerate
474@item @code{chatwidget}
475@item @code{datefield}
476@item @code{tooltip}
477@item @code{cursor}
478@item @code{ipentry}
479@item @code{tablelist}
480@item @code{history}
481@item @code{tkpiechart}
482@item @code{ico}
483@item @code{crosshair}
484@item @code{ntext}
485@item @code{plotchart}
486@item @code{ctext}
487@item @code{autosscroll}
488@item @code{canvas}
489@end enumerate")
490 (license (package-license tcl))))
491
492(define-public tclxml
493 (package
494 (name "tclxml")
495 (version "3.2")
496 (source (origin
497 (method url-fetch)
498 (uri (string-append "mirror://sourceforge/" name "/TclXML/"
499 version "/" name "-" version ".tar.gz"))
500 (sha256
501 (base32
502 "0ffb4aw63inig3aql33g4pk0kjk14dv238anp1scwjdjh1k6n4gl"))
503 (patches (search-patches "tclxml-3.2-install.patch"))))
504 (build-system gnu-build-system)
505 (native-inputs
506 (list tcl libxml2 libxslt))
507 (propagated-inputs
508 (list tcllib)) ; uri
509 (native-search-paths
510 (list (search-path-specification
511 (variable "TCLLIBPATH")
512 (separator " ")
513 (files (list (string-append "lib/Tclxml" version))))))
514 (arguments
515 `(#:configure-flags
516 (list (string-append "CFLAGS=-g -O2"
517 " -Wno-implicit-function-declaration"
518 " -Wno-incompatible-pointer-types")
519 (string-append "--exec-prefix=" (assoc-ref %outputs "out"))
520 (string-append "--with-tclconfig="
521 (assoc-ref %build-inputs "tcl") "/lib")
522 (string-append "--with-xml2-config="
523 (assoc-ref %build-inputs "libxml2")
524 "/bin/xml2-config")
525 (string-append "--with-xslt-config="
526 (assoc-ref %build-inputs "libxslt")
527 "/bin/xslt-config"))
528 #:test-target "test"))
529 (home-page "https://tclxml.sourceforge.net/")
530 (synopsis "Tcl library for XML parsing")
531 (description "TclXML provides event-based parsing of XML documents. The
532application may register callback scripts for certain document features, and
533when the parser encounters those features while parsing the document the
534callback is evaluated.")
535 (license (license:non-copyleft
536 "file://LICENCE"
537 "See LICENCE in the distribution."))))
538
539(define-public tclx
540 (package
541 (name "tclx")
542 (version "8.4.1")
543 (source (origin
544 (method url-fetch)
545 (uri (string-append "mirror://sourceforge/tclx/TclX/"
546 version "/tclx" version ".tar.bz2"))
547 (sha256
548 (base32
549 "1v2qwzzidz0is58fd1p7wfdbscxm3ip2wlbqkj5jdhf6drh1zd59"))))
550 (build-system gnu-build-system)
551 (arguments
552 '(#:tests? #f ; a test named profile.test segfaults
553 #:configure-flags (list (string-append "--with-tcl="
554 (assoc-ref %build-inputs "tcl")
555 "/lib")
556 (string-append "--libdir="
557 (assoc-ref %outputs "out")
558 "/lib"))))
559 (inputs
560 (list tcl tk))
561 (home-page "https://tclx.sourceforge.net/")
562 (synopsis "System programming extensions for Tcl")
563 (description
564 "Extended Tcl is oriented towards system programming tasks and large
565application development. TclX provides additional interfaces to the operating
566system, and adds many new programming constructs, text manipulation tools, and
567debugging tools.")
568 (license license:tcl/tk)))
569
570(define-public tcl-tls
571 (package
572 (name "tcl-tls")
573 (version "1.7.22")
574 (source
575 (origin
576 (method url-fetch)
577 (uri (string-append "https://core.tcl-lang.org/tcltls/uv/tcltls-"
578 version ".tar.gz"))
579 (sha256
580 (base32
581 "1d639gzngxp7zwwpb4ayh663br6vhsbiy6wxm952rj2y4xx2nkp8"))))
582 (build-system gnu-build-system)
583 (inputs (list tcl))
584 (propagated-inputs (list openssl))
585 (arguments
586 (list #:configure-flags
587 #~(let ((tcl #$(this-package-input "tcl")))
588 (list "--with-ssl=libressl"
589 (string-append "-with-ssl-dir="
590 #$(this-package-input "openssl"))
591 (string-append "--with-tcl=" tcl "/lib")
592 (string-append "--with-tclinclude=" tcl "/include")
593 (string-append "--exec-prefix=" #$output)
594 (string-append "--mandir=" #$output "/share/man")))
595
596 #:test-target "test"))
597 (search-paths
598 (list (search-path-specification
599 (variable "TCLLIBPATH")
600 (separator " ")
601 (files (list (string-append "lib/tcltls" version))))))
602 (home-page "https://core.tcl-lang.org/tcltls/index")
603 (synopsis "Tcl binding to OpenSSL toolkit")
604 (description
605 "This extension provides a generic binding to OpenSSL, utilizing the
606@code{Tcl_StackChannel} API for Tcl 8.2 and higher. The sockets behave
607exactly the same as channels created using Tcl's built-in socket command with
608additional options for controlling the SSL session.")
609 (properties
610 '((release-monitoring-url
611 . "https://core.tcl-lang.org/tcltls/wiki/Download")
612 (upstream-name . "tcltls")))
613 (license license:public-domain)))