Commit | Line | Data |
---|---|---|
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> |
fdc61ca1 | 7 | ;;; Copyright © 2019, 2020 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 CR |
39 | #:use-module (gnu packages libevent) |
40 | #:use-module (gnu packages ncurses)) | |
41 | ||
42 | (define-public tmux | |
43 | (package | |
44 | (name "tmux") | |
80e0e112 | 45 | (version "3.1b") |
b1426f17 CR |
46 | (source (origin |
47 | (method url-fetch) | |
48 | (uri (string-append | |
9a59673d | 49 | "https://github.com/tmux/tmux/releases/download/" |
b1426f17 CR |
50 | version "/tmux-" version ".tar.gz")) |
51 | (sha256 | |
52 | (base32 | |
80e0e112 | 53 | "1fbd93hzaz64h7j0h9nsll29avbq1ikqa438wrgsf1dga0fkagyr")))) |
b1426f17 CR |
54 | (build-system gnu-build-system) |
55 | (inputs | |
56 | `(("libevent" ,libevent) | |
57 | ("ncurses" ,ncurses))) | |
b5b4d912 | 58 | (home-page "https://tmux.github.io/") |
9e771e3b | 59 | (synopsis "Terminal multiplexer") |
b1426f17 CR |
60 | (description |
61 | "tmux is a terminal multiplexer: it enables a number of terminals (or | |
62 | windows), each running a separate program, to be created, accessed, and | |
e881752c | 63 | controlled from a single screen. tmux may be detached from a screen and |
b1426f17 | 64 | continue running in the background, then later reattached.") |
41ee3773 | 65 | (license license:isc))) |
cdd8e077 MJ |
66 | |
67 | (define-public tmux-themepack | |
68 | (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48") | |
69 | (revision "1")) | |
70 | (package | |
71 | (name "tmux-themepack") | |
7bef8fd5 | 72 | (version (git-version "0.0.0" revision commit)) ; no version tags |
cdd8e077 MJ |
73 | (source (origin |
74 | (method git-fetch) | |
75 | (uri (git-reference | |
7bef8fd5 | 76 | (url "https://github.com/jimeh/tmux-themepack.git") |
cdd8e077 MJ |
77 | (commit commit))) |
78 | (sha256 | |
79 | (base32 | |
80 | "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl")) | |
7bef8fd5 | 81 | (file-name (git-file-name name version)))) |
cdd8e077 MJ |
82 | (build-system gnu-build-system) |
83 | (arguments | |
7bef8fd5 | 84 | `(#:tests? #f ; no test suite |
cdd8e077 MJ |
85 | #:phases (modify-phases %standard-phases |
86 | (delete 'configure) | |
87 | (delete 'build) | |
88 | (replace 'install | |
89 | (lambda* (#:key outputs #:allow-other-keys) | |
90 | (let* ((out (string-append | |
91 | (assoc-ref outputs "out") | |
92 | "/share/" ,name "-" ,version))) | |
93 | (copy-recursively "." out))))))) | |
94 | (home-page "https://github.com/jimeh/tmux-themepack") | |
95 | (synopsis "Collection of themes for Tmux") | |
96 | (description "A collection of various themes for Tmux.") | |
6f38ef73 | 97 | (license license:wtfpl2)))) |
6c8b802f SR |
98 | |
99 | (define-public tmuxifier | |
100 | (package | |
101 | (name "tmuxifier") | |
102 | (version "0.13.0") | |
103 | (source (origin | |
66377fdc TGR |
104 | (method git-fetch) |
105 | (uri (git-reference | |
106 | (url "https://github.com/jimeh/tmuxifier.git") | |
107 | (commit (string-append "v" version)))) | |
108 | (file-name (git-file-name name version)) | |
6c8b802f SR |
109 | (sha256 |
110 | (base32 | |
66377fdc | 111 | "1b6a1cw2mnml84k5vhbcp58kvp94xlnlpp4kwdhqw4jrzfgcjfzd")))) |
6c8b802f SR |
112 | (build-system gnu-build-system) |
113 | (arguments | |
114 | `(#:tests? #f | |
115 | #:phases (modify-phases %standard-phases | |
116 | (delete 'configure) | |
117 | (delete 'build) | |
118 | (replace 'install | |
119 | (lambda* (#:key outputs #:allow-other-keys) | |
120 | (let* ((out (assoc-ref %outputs "out")) | |
121 | (bindir (string-append out "/bin")) | |
122 | (share (string-append out "/share/" ,name))) | |
123 | (install-file "bin/tmuxifier" bindir) | |
124 | (substitute* (string-append bindir "/tmuxifier") | |
125 | (("set -e") | |
126 | (string-append "TMUXIFIER=" share "\nset -e"))) | |
127 | (for-each (lambda (init-script) | |
128 | (install-file init-script (string-append | |
129 | share "/init"))) | |
130 | '("init.sh" "init.tcsh" "init.fish")) | |
131 | (for-each (lambda (dir) | |
132 | (copy-recursively dir (string-append | |
133 | share "/" dir))) | |
134 | '("completion" "lib" "libexec" | |
135 | "templates")))))))) | |
136 | (home-page "https://github.com/jimeh/tmuxifier") | |
137 | (synopsis "Powerful session, window & pane management for Tmux") | |
138 | (description "Tmuxifier allows you to easily create, edit, and load | |
139 | @code{layout} files, which are simple shell scripts where you use the tmux | |
140 | command and helper commands provided by tmuxifier to manage Tmux sessions and | |
141 | windows.") | |
41ee3773 | 142 | (license license:expat))) |
e80a809f | 143 | |
3565a30f EK |
144 | (define-public python-libtmux |
145 | (package | |
146 | (name "python-libtmux") | |
147 | (version "0.8.2") | |
148 | (source | |
149 | (origin | |
150 | (method git-fetch) | |
151 | ;; PyPI source tarball does not include tests. | |
152 | (uri (git-reference | |
153 | (url "https://github.com/tmux-python/libtmux.git") | |
154 | (commit (string-append "v" version)))) | |
155 | (file-name (git-file-name name version)) | |
156 | (sha256 | |
157 | (base32 | |
158 | "1akjv6aqpc690c4l2cjh0fxbpxxg63sfjggapfjjjaqmcl38g1dz")))) | |
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"))) | |
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 | ||
e80a809f OP |
188 | (define-public tmux-xpanes |
189 | (package | |
190 | (name "tmux-xpanes") | |
fdc61ca1 | 191 | (version "4.1.2") |
e80a809f OP |
192 | (source (origin |
193 | (method git-fetch) | |
194 | (uri (git-reference | |
195 | (url "https://github.com/greymd/tmux-xpanes.git") | |
196 | (commit (string-append "v" version)))) | |
197 | (file-name (git-file-name name version)) | |
198 | (sha256 | |
199 | (base32 | |
fdc61ca1 | 200 | "0vm5mi6dqdbg0b5qh4r8sr1plpc00jryd8a2qxpp3a72cigjvvf0")))) |
e80a809f OP |
201 | (build-system trivial-build-system) |
202 | (inputs | |
203 | `(("bash" ,bash))) | |
204 | (arguments | |
205 | `(#:modules ((guix build utils)) | |
206 | #:builder | |
207 | (begin | |
208 | (use-modules (guix build utils)) | |
209 | (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin")) | |
210 | (copy-recursively (assoc-ref %build-inputs "source") ".") | |
211 | (substitute* "bin/xpanes" | |
212 | (("/bin/bash") (which "bash"))) | |
213 | (install-file "bin/xpanes" (string-append %output "/bin")) | |
214 | (install-file "man/xpanes.1" (string-append %output "/man/man1")) | |
215 | #t))) | |
216 | (home-page "https://github.com/greymd/tmux-xpanes") | |
217 | (synopsis "Tmux based terminal divider") | |
218 | (description "This package provides tmux-based terminal divider. | |
219 | ||
220 | @code{xpanes} or @code{tmux-xpanes} (alias of @code{xpanes}) commands have | |
221 | following features: | |
222 | ||
223 | @itemize | |
224 | @item Split tmux window into multiple panes. | |
225 | @item Build command lines & execute them on the panes. | |
226 | @item Runnable from outside of tmux session. | |
227 | @item Runnable from inside of tmux session. | |
228 | @item Record operation log. | |
229 | @item Flexible layout arrangement for panes. | |
230 | @item Display pane title on each pane. | |
231 | @item Generate command lines from standard input (Pipe mode). | |
232 | @end itemize") | |
41ee3773 | 233 | (license license:expat))) |