projects/guix·blob java-team · refs

462 lines · 18.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Cyril Roelandt <[email protected]>
3;;; Copyright © 2016, 2026 Efraim Flashner <[email protected]>
4;;; Copyright © 2016 Matthew Jordan <[email protected]>
5;;; Copyright © 2017 Vasile Dumitrascu <[email protected]>
6;;; Copyright © 2017 Stefan Reichör <[email protected]>
7;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <[email protected]>
8;;; Copyright © 2019 Oleg Pykhalov <[email protected]>
9;;; Copyright © 2020, 2021 Brice Waegeneire <[email protected]>
10;;; Copyright © 2020 Edouard Klein <[email protected]>
11;;; Copyright © 2021 Matthew James Kraai <[email protected]>
12;;; Copyright © 2024, 2026 Ashish SHUKLA <[email protected]>
13;;; Copyright © 2024 Zheng Junjie <[email protected]>
14;;; Copyright © 2025 Alex Bosco <[email protected]>
15;;;
16;;; This file is part of GNU Guix.
17;;;
18;;; GNU Guix is free software; you can redistribute it and/or modify it
19;;; under the terms of the GNU General Public License as published by
20;;; the Free Software Foundation; either version 3 of the License, or (at
21;;; your option) any later version.
22;;;
23;;; GNU Guix is distributed in the hope that it will be useful, but
24;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26;;; GNU General Public License for more details.
27;;;
28;;; You should have received a copy of the GNU General Public License
29;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31(define-module (gnu packages tmux)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix download)
34 #:use-module (guix gexp)
35 #:use-module (guix packages)
36 #:use-module (guix git-download)
37 #:use-module (guix build-system cargo)
38 #:use-module (guix build-system cmake)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system trivial)
41 #:use-module (guix build-system pyproject)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages bison)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages linux)
48 #:use-module (gnu packages libevent)
49 #:use-module (gnu packages markup)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages python-build)
53 #:use-module (gnu packages python-check)
54 #:use-module (gnu packages python-xyz)
55 #:use-module (gnu packages sphinx)
56 #:use-module (gnu packages ssh)
57 #:use-module (gnu packages tls)
58 #:use-module (gnu packages version-control))
59
60(define-public tmux
61 (package
62 (name "tmux")
63 (version "3.7c")
64 (source (origin
65 (method git-fetch)
66 (uri (git-reference
67 (url "https://github.com/tmux/tmux")
68 (commit version)))
69 (file-name (git-file-name name version))
70 (sha256
71 (base32
72 "15im02s6p68p74fddsg5fdvpcgi19kp3xh2vay6gwhnawm6mg5jf"))))
73 (build-system gnu-build-system)
74 (inputs
75 (list libevent ncurses))
76 (native-inputs
77 (list autoconf automake bison pkg-config))
78 (home-page "https://github.com/tmux/tmux/wiki")
79 (synopsis "Terminal multiplexer")
80 (description
81 "tmux is a terminal multiplexer: it enables a number of terminals (or
82windows), each running a separate program, to be created, accessed, and
83controlled from a single screen. tmux may be detached from a screen and
84continue running in the background, then later reattached.")
85 (license license:isc)))
86
87(define-public tmux-themepack
88 (package
89 (name "tmux-themepack")
90 (version "1.1.0")
91 (source (origin
92 (method git-fetch)
93 (uri (git-reference
94 (url "https://github.com/jimeh/tmux-themepack")
95 (commit version)))
96 (sha256
97 (base32
98 "00dmd16ngyag3n46rbnl9vy82ih6g0y02yfwkid32a1c8vdbvb3z"))
99 (file-name (git-file-name name version))))
100 (build-system gnu-build-system)
101 (arguments
102 `(#:tests? #f ; no test suite
103 #:phases (modify-phases %standard-phases
104 (delete 'configure)
105 (delete 'build)
106 (replace 'install
107 (lambda* (#:key outputs #:allow-other-keys)
108 (let* ((out (string-append
109 (assoc-ref outputs "out")
110 "/share/" ,name)))
111 (copy-recursively "powerline" (string-append out "/powerline"))
112 (for-each (lambda (file) (copy-file file (string-append out "/" file)))
113 '("basic.tmuxtheme"
114 "default.tmuxtheme"
115 "themepack.tmux"))))))))
116 (home-page "https://github.com/jimeh/tmux-themepack")
117 (synopsis "Collection of themes for Tmux")
118 (description
119 "This package provides several themes for Tmux, the terminal multiplexer.")
120 (license license:wtfpl2)))
121
122(define-public tmuxifier
123 (package
124 (name "tmuxifier")
125 (version "0.13.0")
126 (source (origin
127 (method git-fetch)
128 (uri (git-reference
129 (url "https://github.com/jimeh/tmuxifier")
130 (commit (string-append "v" version))))
131 (file-name (git-file-name name version))
132 (sha256
133 (base32
134 "1b6a1cw2mnml84k5vhbcp58kvp94xlnlpp4kwdhqw4jrzfgcjfzd"))))
135 (build-system gnu-build-system)
136 (arguments
137 `(#:tests? #f
138 #:phases (modify-phases %standard-phases
139 (delete 'configure)
140 (delete 'build)
141 (replace 'install
142 (lambda* (#:key outputs #:allow-other-keys)
143 (let* ((out (assoc-ref %outputs "out"))
144 (bindir (string-append out "/bin"))
145 (share (string-append out "/share/" ,name)))
146 (install-file "bin/tmuxifier" bindir)
147 (substitute* (string-append bindir "/tmuxifier")
148 (("set -e")
149 (string-append "TMUXIFIER=" share "\nset -e")))
150 (for-each (lambda (init-script)
151 (install-file init-script (string-append
152 share "/init")))
153 '("init.sh" "init.tcsh" "init.fish"))
154 (for-each (lambda (dir)
155 (copy-recursively dir (string-append
156 share "/" dir)))
157 '("completion" "lib" "libexec"
158 "templates"))))))))
159 (home-page "https://github.com/jimeh/tmuxifier")
160 (synopsis "Powerful session, window & pane management for Tmux")
161 (description "Tmuxifier allows you to easily create, edit, and load
162@code{layout} files, which are simple shell scripts where you use the tmux
163command and helper commands provided by tmuxifier to manage Tmux sessions and
164windows.")
165 (license license:expat)))
166
167(define-public python-libtmux
168 (package
169 (name "python-libtmux")
170 (version "0.60.0")
171 (source
172 (origin
173 (method git-fetch)
174 (uri (git-reference
175 (url "https://github.com/tmux-python/libtmux")
176 (commit (string-append "v" version))))
177 (file-name (git-file-name name version))
178 (sha256
179 (base32 "1fjrlk4z01cv0a0hnwxqq4ah6kljnnhbq3p3lpv06iyq028sl7yn"))))
180 (build-system pyproject-build-system)
181 (arguments
182 (list
183 #:test-flags
184 #~(list "-o" "addopts=''" ; Missing development dependency.
185 "-k"
186 (string-join
187 (map (lambda (f)
188 (string-append "not test_" f))
189 '("capture_pane_start" ; Permission denied.
190 "control_mode_stdout_preserves_non_ascii_output"
191 "new_window_name_invalid_on_3_7"))
192 " and "))
193 #:phases
194 #~(modify-phases %standard-phases
195 (add-before 'check 'configure-tests
196 (lambda _
197 ;; Fix <https://github.com/tmux-python/libtmux/issues/265>.
198 (setenv "LANG" "en_US.utf8"))))))
199 (propagated-inputs (list procps)) ;tests need top
200 (native-inputs (list python-hatchling python-pytest tmux))
201 (home-page "https://github.com/tmux-python/libtmux")
202 (synopsis "Python API for tmux")
203 (description
204 "Libtmux is the tool behind @command{tmuxp}, a tmux workspace
205manager in Python. It creates object mappings to traverse, inspect and interact
206with live tmux sessions.")
207 (license license:expat)))
208
209(define-public tmux-xpanes
210 (package
211 (name "tmux-xpanes")
212 (version "4.2.0")
213 (source (origin
214 (method git-fetch)
215 (uri (git-reference
216 (url "https://github.com/greymd/tmux-xpanes")
217 (commit (string-append "v" version))))
218 (file-name (git-file-name name version))
219 (sha256
220 (base32
221 "0k37zswn6s9iclm9yasil9jhy768qn9fv3m489irfwrx1vc8lp9w"))))
222 (build-system trivial-build-system)
223 (inputs
224 (list bash))
225 (arguments
226 `(#:modules ((guix build utils))
227 #:builder
228 (begin
229 (use-modules (guix build utils))
230 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
231 (copy-recursively (assoc-ref %build-inputs "source") ".")
232 (substitute* "bin/xpanes"
233 (("/bin/bash") (which "bash")))
234 (install-file "bin/xpanes" (string-append %output "/bin"))
235 (install-file "man/xpanes.1" (string-append %output "/man/man1"))
236 #t)))
237 (home-page "https://github.com/greymd/tmux-xpanes")
238 (synopsis "Tmux based terminal divider")
239 (description "This package provides tmux-based terminal divider.
240
241@code{xpanes} or @code{tmux-xpanes} (alias of @code{xpanes}) commands have
242following features:
243
244@itemize
245@item Split tmux window into multiple panes.
246@item Build command lines & execute them on the panes.
247@item Runnable from outside of tmux session.
248@item Runnable from inside of tmux session.
249@item Record operation log.
250@item Flexible layout arrangement for panes.
251@item Display pane title on each pane.
252@item Generate command lines from standard input (Pipe mode).
253@end itemize")
254 (license license:expat)))
255
256(define-public tmux-plugin-resurrect
257 (let ((commit "a2ddfb96b94bb64a7a2e3f5fa2a7c57dce8ad579")
258 (revision "0"))
259 (package
260 (name "tmux-plugin-resurrect")
261 (version (git-version "0" revision commit))
262 (source (origin
263 (method git-fetch)
264 (uri (git-reference
265 (url "https://github.com/tmux-plugins/tmux-resurrect/")
266 (commit commit)))
267 (file-name (git-file-name name version))
268 (sha256
269 (base32
270 "1gc8z99na1d4scn2kq4alwyn43h3r7ykz9bkhcypjh8iri6dsl0c"))))
271 (build-system trivial-build-system)
272 (arguments
273 `(#:modules ((guix build utils))
274 #:builder (begin
275 (use-modules (guix build utils))
276 (let ((out (string-append %output
277 "/share/tmux-plugins/resurrect/")))
278 (mkdir-p out)
279 (copy-recursively (assoc-ref %build-inputs "source") out)))))
280 (synopsis "Restore tmux environment after system restart")
281 (description
282 "This plugin goes to great lengths to save and restore all the details
283from your tmux environment. Here's what's been taken care of:
284
285@itemize
286@item all sessions, windows, panes and their order
287@item current working directory for each pane
288@item exact pane layouts within windows (even when zoomed)
289@item active and alternative session
290@item active and alternative window for each session
291@item windows with focus
292@item active pane for each window
293@item \"grouped sessions\" (useful feature when using tmux with multiple monitors)
294@item programs running within a pane! More details in the restoring programs doc.
295@end itemize
296
297Optional:
298
299@itemize
300@item restoring vim and neovim sessions
301@item restoring pane contents
302@end itemize")
303 (home-page "https://github.com/tmux-plugins/tmux-resurrect/")
304 (license license:expat))))
305
306(define-public tmux-plugin-continuum
307 (let ((commit "3e4bc35da41f956c873aea716c97555bf1afce5d")
308 (revision "0"))
309 (package
310 (name "tmux-plugin-continuum")
311 (version (git-version "0" revision commit))
312 (source (origin
313 (method git-fetch)
314 (uri (git-reference
315 (url "https://github.com/tmux-plugins/tmux-continuum/")
316 (commit commit)))
317 (file-name (git-file-name name version))
318 (sha256
319 (base32
320 "1py8qfs2f93hkxhk039m813bjgcs5k54si662gx05g3czqy06pb7"))))
321 (build-system trivial-build-system)
322 (arguments
323 `(#:modules ((guix build utils))
324 #:builder (begin
325 (use-modules (guix build utils))
326 (let ((out (string-append %output
327 "/share/tmux-plugins/continuum/")))
328 (mkdir-p out)
329 (copy-recursively (assoc-ref %build-inputs "source")
330 out)))))
331 (synopsis "Continuous saving of tmux environment")
332 (description
333 "Features:
334
335@itemize
336@item continuous saving of tmux environment
337@item automatic tmux start when computer/server is turned on
338@item automatic restore when tmux is started
339@end itemize
340
341Together, these features enable uninterrupted tmux usage. No matter the
342computer or server restarts, if the machine is on, tmux will be there how you
343left it off the last time it was used.")
344 (home-page "https://github.com/tmux-plugins/tmux-continuum/")
345 (license license:expat))))
346
347(define-public tmux-plugin-mem-cpu-load
348 (package
349 (name "tmux-plugin-mem-cpu-load")
350 (version "3.8.2")
351 (source (origin
352 (method git-fetch)
353 (uri (git-reference
354 (url "https://github.com/thewtex/tmux-mem-cpu-load")
355 (commit (string-append "v" version))))
356 (sha256
357 (base32
358 "041hd6s6prk63r121yggxmzhbp40h6r04mrby0q51x43lfgvmvw3"))
359 (file-name (git-file-name name version))))
360 (build-system cmake-build-system)
361 (synopsis "CPU, RAM, and load monitor for use with tmux")
362 (description "This package provides a lightweight program for system
363monitoring in the status line of tmux.
364
365The memory monitor displays the used and available memory.
366
367The CPU usage monitor outputs a percent CPU usage over all processors. It
368also displays a textual bar graph of the current percent usage.
369
370The system load average is also displayed.")
371 (home-page "https://github.com/thewtex/tmux-mem-cpu-load")
372 (license license:asl2.0)))
373
374(define-public tmux-plugin-sessionizer
375 (package
376 (name "tmux-plugin-sessionizer")
377 (version "0.4.4")
378 (source
379 (origin
380 (method url-fetch)
381 (uri (crate-uri "tmux-sessionizer" version))
382 (file-name (string-append name "-" version ".tar.gz"))
383 (sha256
384 (base32 "0fwdc8jyx9fab442c6zsl3yn8nh1s5h35g97cgqhyp3blxl6h9ix"))
385 (snippet #~(begin
386 (use-modules (guix build utils))
387 (substitute* "Cargo.toml"
388 (("\"vendored-openssl\"")
389 ""))))))
390 (build-system cargo-build-system)
391 (arguments
392 (list
393 #:install-source? #f
394 #:modules
395 '((guix build cargo-build-system)
396 (guix build utils)
397 (ice-9 match))
398 #:phases
399 #~(modify-phases %standard-phases
400 (add-after 'install 'install-extras
401 (lambda* (#:key native-inputs #:allow-other-keys)
402 (for-each
403 (match-lambda
404 ((shell . path)
405 (mkdir-p (in-vicinity #$output (dirname path)))
406 (let ((binary
407 (if #$(%current-target-system)
408 (search-input-file native-inputs "bin/tms")
409 (in-vicinity #$output "bin/tms"))))
410 (with-output-to-file (in-vicinity #$output path)
411 (lambda _
412 (invoke binary "--generate" shell))))))
413 '(("bash" . "share/bash-completion/completions/tms")
414 ("elvish" . "share/elvish/lib/tms")
415 ("fish" . "share/fish/vendor_completions.d/tms.fish")
416 ("zsh" . "share/zsh/site-functions/_tms"))))))))
417 (native-inputs
418 (append
419 (if (%current-target-system)
420 (list this-package)
421 '())
422 (list pkg-config)))
423 (inputs
424 (cons* openssl
425 libgit2-1.8
426 libssh2
427 (cargo-inputs 'tmux-plugin-sessionizer)))
428 (home-page "https://github.com/jrmoulton/tmux-sessionizer")
429 (synopsis "Fuzzy find Git repositories and open them as Tmux sessions")
430 (description
431 "Tmux Sessionizer is a command-line tool to fuzzy find all the Git
432repositories in a list of specified folders and open them as a new tmux session.
433For @code{git worktrees}, this tool opens all checked out worktrees as new windows.")
434 (license license:expat)))
435
436(define-public opentmux
437 (package
438 (name "opentmux")
439 (version "0.1")
440 (home-page "https://codeberg.org/opentmux/opentmux")
441 (source (origin
442 (method git-fetch)
443 (uri (git-reference
444 (url home-page)
445 (commit (string-append "v" version))))
446 (file-name (git-file-name name version))
447 (sha256
448 (base32
449 "0b8gy3acysw0vi28g4327iq5cj3zsv9cvvx21iqnkcvk6hqvyrnc"))))
450 (build-system gnu-build-system)
451 (inputs
452 (list libevent ncurses))
453 (native-inputs
454 (list autoconf automake bison lowdown pkg-config))
455 (synopsis "Terminal multiplexer")
456 (description
457 "opentmux is fork of tmux, before AI was introduced. tmux is a terminal
458multiplexer: it enables a number of terminals (or windows), each running a
459separate program, to be created, accessed, and controlled from a single screen.
460tmux may be detached from a screen and continue running in the background, then
461later reattached.")
462 (license license:isc)))