gnu: Add qtwayland, version 6.3.1.
[jackhill/guix/guix.git] / gnu / packages / tmux.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
5 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
6 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
7 ;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2019 Oleg Pykhalov <go.wigust@gmail.com>
9 ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
10 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
11 ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages tmux)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system trivial)
35 #:use-module (guix build-system python)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages bash)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages linux)
40 #:use-module (gnu packages libevent)
41 #:use-module (gnu packages ncurses)
42 #:use-module (gnu packages sphinx))
43
44 (define-public tmux
45 (package
46 (name "tmux")
47 (version "3.2a")
48 (source (origin
49 (method url-fetch)
50 (uri (string-append
51 "https://github.com/tmux/tmux/releases/download/"
52 version "/tmux-" version ".tar.gz"))
53 (sha256
54 (base32
55 "0pyhmipg6vxvxjk7mr410007qk98rh5q0mljvkdaisibz2j565am"))))
56 (build-system gnu-build-system)
57 (inputs
58 (list libevent ncurses))
59 (home-page "https://github.com/tmux/tmux/wiki")
60 (synopsis "Terminal multiplexer")
61 (description
62 "tmux is a terminal multiplexer: it enables a number of terminals (or
63 windows), each running a separate program, to be created, accessed, and
64 controlled from a single screen. tmux may be detached from a screen and
65 continue running in the background, then later reattached.")
66 (license license:isc)))
67
68 (define-public tmux-themepack
69 (package
70 (name "tmux-themepack")
71 (version "1.1.0")
72 (source (origin
73 (method git-fetch)
74 (uri (git-reference
75 (url "https://github.com/jimeh/tmux-themepack")
76 (commit version)))
77 (sha256
78 (base32
79 "00dmd16ngyag3n46rbnl9vy82ih6g0y02yfwkid32a1c8vdbvb3z"))
80 (file-name (git-file-name name version))))
81 (build-system gnu-build-system)
82 (arguments
83 `(#:tests? #f ; no test suite
84 #:phases (modify-phases %standard-phases
85 (delete 'configure)
86 (delete 'build)
87 (replace 'install
88 (lambda* (#:key outputs #:allow-other-keys)
89 (let* ((out (string-append
90 (assoc-ref outputs "out")
91 "/share/" ,name)))
92 (copy-recursively "powerline" (string-append out "/powerline"))
93 (for-each (lambda (file) (copy-file file (string-append out "/" file)))
94 '("basic.tmuxtheme"
95 "default.tmuxtheme"
96 "themepack.tmux"))))))))
97 (home-page "https://github.com/jimeh/tmux-themepack")
98 (synopsis "Collection of themes for Tmux")
99 (description
100 "This package provides several themes for Tmux, the terminal multiplexer.")
101 (license license:wtfpl2)))
102
103 (define-public tmuxifier
104 (package
105 (name "tmuxifier")
106 (version "0.13.0")
107 (source (origin
108 (method git-fetch)
109 (uri (git-reference
110 (url "https://github.com/jimeh/tmuxifier")
111 (commit (string-append "v" version))))
112 (file-name (git-file-name name version))
113 (sha256
114 (base32
115 "1b6a1cw2mnml84k5vhbcp58kvp94xlnlpp4kwdhqw4jrzfgcjfzd"))))
116 (build-system gnu-build-system)
117 (arguments
118 `(#:tests? #f
119 #:phases (modify-phases %standard-phases
120 (delete 'configure)
121 (delete 'build)
122 (replace 'install
123 (lambda* (#:key outputs #:allow-other-keys)
124 (let* ((out (assoc-ref %outputs "out"))
125 (bindir (string-append out "/bin"))
126 (share (string-append out "/share/" ,name)))
127 (install-file "bin/tmuxifier" bindir)
128 (substitute* (string-append bindir "/tmuxifier")
129 (("set -e")
130 (string-append "TMUXIFIER=" share "\nset -e")))
131 (for-each (lambda (init-script)
132 (install-file init-script (string-append
133 share "/init")))
134 '("init.sh" "init.tcsh" "init.fish"))
135 (for-each (lambda (dir)
136 (copy-recursively dir (string-append
137 share "/" dir)))
138 '("completion" "lib" "libexec"
139 "templates"))))))))
140 (home-page "https://github.com/jimeh/tmuxifier")
141 (synopsis "Powerful session, window & pane management for Tmux")
142 (description "Tmuxifier allows you to easily create, edit, and load
143 @code{layout} files, which are simple shell scripts where you use the tmux
144 command and helper commands provided by tmuxifier to manage Tmux sessions and
145 windows.")
146 (license license:expat)))
147
148 (define-public python-libtmux
149 (package
150 (name "python-libtmux")
151 (version "0.10.1")
152 (source
153 (origin
154 (method git-fetch)
155 ;; PyPI source tarball does not include tests.
156 (uri (git-reference
157 (url "https://github.com/tmux-python/libtmux")
158 (commit (string-append "v" version))))
159 (file-name (git-file-name name version))
160 (sha256
161 (base32 "068vy92f2668vrjvd3laqvxd48cmna66f2msdmwk2hm9qxklgf51"))))
162 (build-system python-build-system)
163 (propagated-inputs
164 (list procps)) ;tests need top
165 (native-inputs
166 (list python-pytest tmux))
167 (arguments
168 `(#:phases
169 (modify-phases %standard-phases
170 (replace 'check
171 (lambda _
172 ;; Fix <https://github.com/tmux-python/libtmux/issues/265>.
173 (setenv "LANG" "en_US.utf8")
174 ;; Skip tests that I suspect fail because of a change
175 ;; in behavior in tmux 3 from tmux 2
176 ;; https://github.com/tmux-python/libtmux/issues/281
177 (invoke "pytest" "-vv" "-k"
178 (string-append "not test_show_option_unknown "
179 "and not test_show_window_option_unknown"))
180 #t)))))
181 (home-page "https://github.com/tmux-python/libtmux")
182 (synopsis "Python API for tmux")
183 (description "Libtmux is the tool behind @command{tmuxp}, a tmux workspace
184 manager in Python. It creates object mappings to traverse, inspect and interact
185 with live tmux sessions.")
186 (license license:expat)))
187
188 (define-public python-daemux
189 (package
190 (name "python-daemux")
191 (version "0.1.0")
192 (source
193 ;; We fetch from the Git repo because there are no tests in the PyPI
194 ;; archive.
195 (origin
196 (method git-fetch)
197 (uri (git-reference
198 (url "https://github.com/edouardklein/daemux")
199 (commit (string-append "v" version))))
200 (file-name (git-file-name name version))
201 (sha256
202 (base32 "0cb8v552f2hkwz6d3hwsmrz3gd28jikga3lcc3r1zlw8ra7804ph"))))
203 (build-system python-build-system)
204 (arguments
205 `(#:phases (modify-phases %standard-phases
206 (replace 'check
207 (lambda _
208 (mkdir-p "tmptmux")
209 (setenv "TMUX_TMPDIR" (string-append (getcwd) "/tmptmux"))
210 (invoke "tmux" "new-session" "-d")
211 (invoke "make" "test"))))))
212 (propagated-inputs
213 (list python-libtmux))
214 (native-inputs
215 (list python-coverage python-sphinx tmux))
216 (home-page "https://github.com/edouardklein/daemux")
217 (synopsis "Start, stop, restart and check daemons via tmux")
218 (description
219 "Daemux lets you run daemons in a @command{tmux} pane. Users can launch
220 long-running background tasks, and check these tasks' health by hand, relaunch
221 them, etc., by attaching to the corresponding pane in tmux.")
222 (license license:agpl3+)))
223
224 (define-public tmux-xpanes
225 (package
226 (name "tmux-xpanes")
227 (version "4.1.3")
228 (source (origin
229 (method git-fetch)
230 (uri (git-reference
231 (url "https://github.com/greymd/tmux-xpanes")
232 (commit (string-append "v" version))))
233 (file-name (git-file-name name version))
234 (sha256
235 (base32
236 "09fmnn1q76r1l4cv7clmfr3j9cjmd053kq238d0qj2i486948ivv"))))
237 (build-system trivial-build-system)
238 (inputs
239 (list bash))
240 (arguments
241 `(#:modules ((guix build utils))
242 #:builder
243 (begin
244 (use-modules (guix build utils))
245 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
246 (copy-recursively (assoc-ref %build-inputs "source") ".")
247 (substitute* "bin/xpanes"
248 (("/bin/bash") (which "bash")))
249 (install-file "bin/xpanes" (string-append %output "/bin"))
250 (install-file "man/xpanes.1" (string-append %output "/man/man1"))
251 #t)))
252 (home-page "https://github.com/greymd/tmux-xpanes")
253 (synopsis "Tmux based terminal divider")
254 (description "This package provides tmux-based terminal divider.
255
256 @code{xpanes} or @code{tmux-xpanes} (alias of @code{xpanes}) commands have
257 following features:
258
259 @itemize
260 @item Split tmux window into multiple panes.
261 @item Build command lines & execute them on the panes.
262 @item Runnable from outside of tmux session.
263 @item Runnable from inside of tmux session.
264 @item Record operation log.
265 @item Flexible layout arrangement for panes.
266 @item Display pane title on each pane.
267 @item Generate command lines from standard input (Pipe mode).
268 @end itemize")
269 (license license:expat)))