projects/guix·blob kernel-updates · refs

240 lines · 9.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Cyril Roelandt <[email protected]>
3;;; Copyright © 2014 Mark H Weaver <[email protected]>
4;;; Copyright © 2015, 2016 Leo Famulari <[email protected]>
5;;; Copyright © 2015, 2017 Eric Bavier <[email protected]>
6;;; Copyright © 2016, 2017, 2019-2022, 2025 Efraim Flashner <[email protected]>
7;;; Copyright © 2016 Alex Griffin <[email protected]>
8;;; Copyright © 2017 Mathieu Othacehe <[email protected]>
9;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2020 Björn Höfling <[email protected]>
11;;; Copyright © 2023 Zheng Junjie <[email protected]>
12;;; Copyright © 2024 Janneke Nieuwenhuizen <[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 screen)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages bash)
33 #:use-module (gnu packages crypto)
34 #:use-module (gnu packages hurd)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages ncurses)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages slang)
40 #:use-module (gnu packages texinfo)
41 #:use-module (gnu packages)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix download)
44 #:use-module (guix gexp)
45 #:use-module (guix git-download)
46 #:use-module (guix packages)
47 #:use-module (guix utils))
48
49(define-public abduco
50 (package
51 (name "abduco")
52 (version "0.6")
53 (source
54 (origin
55 (method git-fetch)
56 (uri (git-reference
57 (url "https://github.com/martanne/abduco")
58 (commit (string-append "v" version))))
59 (file-name (git-file-name name version))
60 (sha256
61 (base32
62 "14cqllh36mvnhwdnl63mrhxlr6a0rq192cmr19ac6cvycicdk6i2"))))
63 (build-system gnu-build-system)
64 (arguments
65 (list
66 #:tests? #f ; No test suite
67 #:make-flags
68 #~(list (string-append "CC=" #$(cc-for-target))
69 (string-append "PREFIX=" #$output))
70 #:phases
71 #~(modify-phases %standard-phases
72 (delete 'configure))))
73 (synopsis "Session management in a clean and simple way")
74 (description "abduco provides session management i.e. it allows programs to
75be run independently from their controlling terminal. That is, programs can
76be detached---run in the background---and then later reattached.")
77 (home-page "https://www.brain-dump.org/projects/abduco/")
78 (license license:isc)))
79
80(define-public byobu
81 (package
82 (name "byobu")
83 (version "5.133")
84 (source
85 (origin
86 (method url-fetch)
87 (uri (string-append "https://launchpad.net/byobu/trunk/"
88 version "/+download/byobu_"
89 version ".orig.tar.gz"))
90 (sha256
91 (base32 "0qvmmdnvwqbgbhn5c8asmrmjhclcl029py2d2zvmd7h5ij7s93jd"))
92 (patches (search-patches "byobu-writable-status.patch"))))
93 (build-system gnu-build-system)
94 (inputs
95 `(("bash" ,bash-minimal) ; for wrap-program
96 ("python" ,python-wrapper) ; for config and session GUIs
97 ("python-newt" ,newt "python")))
98 (arguments
99 `(#:phases
100 (modify-phases %standard-phases
101 (add-before
102 'configure 'provide-locale
103 (lambda* (#:key inputs #:allow-other-keys)
104 (let ((libc (assoc-ref inputs "libc"))) ; implicit input
105 (substitute* "usr/bin/byobu.in"
106 (("locale") (string-append libc "/bin/locale")))
107 #t)))
108 (add-after
109 'install 'wrap-python-scripts
110 (lambda* (#:key inputs outputs #:allow-other-keys)
111 (let* ((python (search-input-file inputs "/bin/python"))
112 (out (assoc-ref outputs "out"))
113 (config (string-append out "/bin/byobu-config"))
114 (select (string-append out "/bin/byobu-select-session")))
115 (wrap-program config
116 `("BYOBU_PYTHON" = (,python))
117 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
118 (wrap-program select
119 `("BYOBU_PYTHON" = (,python)))
120 #t))))))
121 (home-page "https://byobu.org/")
122 (synopsis "Text-based window manager and terminal multiplexer")
123 (description
124 "Byobu is a Japanese term for decorative, multi-panel screens that serve
125as folding room dividers. The Byobu software includes an enhanced profile,
126configuration utilities, and system status notifications for the GNU Screen
127window manager as well as the Tmux terminal multiplexer.")
128 (license license:gpl3+)))
129
130(define-public dtach
131 (package
132 (name "dtach")
133 (version "0.9")
134 (source (origin
135 (method url-fetch)
136 (uri (string-append "mirror://sourceforge/" name "/" name "/"
137 version "/" name "-" version ".tar.gz"))
138 (sha256
139 (base32
140 "1wwj2hlngi8qn2pisvhyfxxs8gyqjlgrrv5lz91w8ly54dlzvs9j"))))
141 (build-system gnu-build-system)
142 (arguments
143 ;; No install target.
144 '(#:phases
145 (modify-phases %standard-phases
146 (replace 'install
147 (lambda* (#:key outputs #:allow-other-keys)
148 (let ((out (assoc-ref outputs "out")))
149 (install-file "dtach" (string-append out "/bin"))
150 (install-file "dtach.1" (string-append out "/share/man/man1"))
151 #t))))
152 ;; No check target.
153 #:tests? #f))
154 (home-page "https://dtach.sourceforge.net/")
155 (synopsis "Emulates the detach feature of screen")
156 (description
157 "dtach is a tiny program that emulates the detach feature of screen,
158allowing you to run a program in an environment that is protected from the
159controlling terminal and attach to it later.")
160 (license license:gpl2+)))
161
162(define-public reptyr
163 (package
164 (name "reptyr")
165 (version "0.10.0")
166 (source
167 (origin
168 (method git-fetch)
169 (uri (git-reference
170 (url "https://github.com/nelhage/reptyr")
171 (commit (string-append "reptyr-" version))))
172 (file-name (git-file-name name version))
173 (sha256
174 (base32 "03k95bf7b46g89j0hgfvra9d512z0ha7vw9358h9j67h9b5bylwf"))))
175 (build-system gnu-build-system)
176 (arguments
177 (list #:tests? #f ; no tests
178 #:make-flags
179 #~(list (string-append "CC=" #$(cc-for-target))
180 (string-append "PREFIX=" #$output)
181 (string-append "BASHCOMPDIR=" #$output
182 "/etc/bash_completion.d"))
183 #:phases
184 #~(modify-phases %standard-phases
185 (delete 'configure)))) ; no configure script
186 (home-page "https://github.com/nelhage/reptyr")
187 (synopsis "Tool for reparenting a running program to a new terminal")
188 (description
189 "reptyr is a utility for taking an existing running program and attaching
190it to a new terminal. Started a long-running process over @code{ssh}, but have
191to leave and don't want to interrupt it? Just start a @code{screen}, use
192reptyr to grab it, and then kill the @code{ssh} session and head on home.")
193 ;; Reptyr currently does not support mips.
194 (supported-systems (delete "mips64el-linux" %supported-systems))
195 (license license:expat)))
196
197(define-public screen
198 (package
199 (name "screen")
200 (version "5.0.2")
201 (source (origin
202 (method git-fetch)
203 (uri (git-reference
204 (url "https://git.savannah.gnu.org/git/screen.git")
205 (commit (string-append "v." version))))
206 (file-name (git-file-name name version))
207 (patches (search-patches "screen-hurd-path-max.patch"))
208 (sha256
209 (base32 "019v1cwgn3l0sivajphjk1n7qnbfmzwq3qsgpb30lv7fprvawq67"))))
210 (build-system gnu-build-system)
211 (native-inputs
212 (list autoconf-2.71 automake texinfo))
213 (inputs
214 (list libxcrypt linux-pam ncurses perl))
215 (arguments
216 (list
217 #:configure-flags
218 ;; GNU_SOURCE must be defined for mallocmock_reset() to be defined
219 #~(list (string-append "CFLAGS=-O2 -g -D_GNU_SOURCE=1"
220 ;; relax gcc-14's strictness, needed for tests.
221 " -Wno-error=int-conversion"
222 " -Wno-error=incompatible-pointer-types")
223
224 ;; By default, screen supports 16 colors, but we want 256 when
225 ;; ~/.screenrc contains 'term xterm-256color'.
226 "--enable-colors256")
227 #:phases
228 #~(modify-phases %standard-phases
229 (add-after 'unpack 'chdir
230 (lambda _ (chdir "src"))))))
231 (home-page "https://www.gnu.org/software/screen/")
232 (synopsis "Full-screen window manager providing multiple terminals")
233 (description
234 "GNU Screen is a terminal window manager that multiplexes a single
235terminal between several processes. The virtual terminals each provide
236features such as a scroll-back buffer and a copy-and-paste mechanism. Screen
237then manages the different virtual terminals, allowing you to easily switch
238between them, to detach them from the current session, or even splitting the
239view to show two terminals at once.")
240 (license license:gpl2+)))