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