screen.scm 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
  3. ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2015, 2017 Eric Bavier <bavier@member.fsf.org>
  5. ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
  7. ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
  8. ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  9. ;;;
  10. ;;; This file is part of GNU Guix.
  11. ;;;
  12. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  13. ;;; under the terms of the GNU General Public License as published by
  14. ;;; the Free Software Foundation; either version 3 of the License, or (at
  15. ;;; your option) any later version.
  16. ;;;
  17. ;;; GNU Guix is distributed in the hope that it will be useful, but
  18. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. ;;; GNU General Public License for more details.
  21. ;;;
  22. ;;; You should have received a copy of the GNU General Public License
  23. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  24. (define-module (gnu packages screen)
  25. #:use-module (srfi srfi-1)
  26. #:use-module (guix licenses)
  27. #:use-module (guix packages)
  28. #:use-module (guix download)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (gnu packages)
  31. #:use-module (gnu packages ncurses)
  32. #:use-module (gnu packages perl)
  33. #:use-module (gnu packages python)
  34. #:use-module (gnu packages slang)
  35. #:use-module (gnu packages texinfo))
  36. (define-public screen
  37. (package
  38. (name "screen")
  39. (version "4.6.2")
  40. (source (origin
  41. (method url-fetch)
  42. (uri (string-append "mirror://gnu/screen/screen-"
  43. version ".tar.gz"))
  44. (sha256
  45. (base32 "0fps0fsipfbh7c2cnp7rjw9n79j0ysq21mk8hzifa33a1r924s8v"))))
  46. (build-system gnu-build-system)
  47. (native-inputs
  48. `(("makeinfo" ,texinfo)))
  49. (inputs
  50. `(("ncurses" ,ncurses)
  51. ("perl" ,perl)))
  52. (arguments
  53. `(#:configure-flags
  54. ;; By default, screen supports 16 colors, but we want 256 when
  55. ;; ~/.screenrc contains 'term xterm-256color'.
  56. '("--enable-colors256")))
  57. (home-page "https://www.gnu.org/software/screen/")
  58. (synopsis "Full-screen window manager providing multiple terminals")
  59. (description
  60. "GNU Screen is a terminal window manager that multiplexes a single
  61. terminal between several processes. The virtual terminals each provide
  62. features such as a scroll-back buffer and a copy-and-paste mechanism. Screen
  63. then manages the different virtual terminals, allowing you to easily switch
  64. between them, to detach them from the current session, or even splitting the
  65. view to show two terminals at once.")
  66. (license gpl2+)))
  67. (define-public dtach
  68. (package
  69. (name "dtach")
  70. (version "0.9")
  71. (source (origin
  72. (method url-fetch)
  73. (uri (string-append "mirror://sourceforge/" name "/" name "/"
  74. version "/" name "-" version ".tar.gz"))
  75. (sha256
  76. (base32
  77. "1wwj2hlngi8qn2pisvhyfxxs8gyqjlgrrv5lz91w8ly54dlzvs9j"))))
  78. (build-system gnu-build-system)
  79. (arguments
  80. ;; No install target.
  81. '(#:phases
  82. (modify-phases %standard-phases
  83. (replace 'install
  84. (lambda* (#:key outputs #:allow-other-keys)
  85. (let ((out (assoc-ref outputs "out")))
  86. (install-file "dtach" (string-append out "/bin"))
  87. (install-file "dtach.1" (string-append out "/share/man/man1"))
  88. #t))))
  89. ;; No check target.
  90. #:tests? #f))
  91. (home-page "http://dtach.sourceforge.net/")
  92. (synopsis "Emulates the detach feature of screen")
  93. (description
  94. "dtach is a tiny program that emulates the detach feature of screen,
  95. allowing you to run a program in an environment that is protected from the
  96. controlling terminal and attach to it later.")
  97. (license gpl2+)))
  98. (define-public byobu
  99. (package
  100. (name "byobu")
  101. (version "5.127")
  102. (source
  103. (origin
  104. (method url-fetch)
  105. (uri (string-append "https://launchpad.net/byobu/trunk/"
  106. version "/+download/byobu_"
  107. version ".orig.tar.gz"))
  108. (sha256
  109. (base32
  110. "0fznlj454vgxgzfw3avmvvjpawggs66da5l8k6v0lnzzd75wgbsb"))
  111. (patches (search-patches "byobu-writable-status.patch"))))
  112. (build-system gnu-build-system)
  113. (inputs
  114. `(("python" ,python-wrapper) ; for config and session GUIs
  115. ("python-newt" ,newt "python")))
  116. (arguments
  117. `(#:phases
  118. (modify-phases %standard-phases
  119. (add-before
  120. 'configure 'provide-locale
  121. (lambda* (#:key inputs #:allow-other-keys)
  122. (let ((libc (assoc-ref inputs "libc"))) ; implicit input
  123. (substitute* "usr/bin/byobu.in"
  124. (("locale") (string-append libc "/bin/locale")))
  125. #t)))
  126. (add-after
  127. 'install 'wrap-python-scripts
  128. (lambda* (#:key inputs outputs #:allow-other-keys)
  129. (let* ((python (string-append (assoc-ref inputs "python")
  130. "/bin/python"))
  131. (out (assoc-ref outputs "out"))
  132. (config (string-append out "/bin/byobu-config"))
  133. (select (string-append out "/bin/byobu-select-session")))
  134. (wrap-program config
  135. `("BYOBU_PYTHON" = (,python))
  136. `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
  137. (wrap-program select
  138. `("BYOBU_PYTHON" = (,python)))
  139. #t))))))
  140. (home-page "https://byobu.org/")
  141. (synopsis "Text-based window manager and terminal multiplexer")
  142. (description
  143. "Byobu is a Japanese term for decorative, multi-panel screens that serve
  144. as folding room dividers. The Byobu software includes an enhanced profile,
  145. configuration utilities, and system status notifications for the GNU Screen
  146. window manager as well as the Tmux terminal multiplexer.")
  147. (license gpl3+)))
  148. (define-public reptyr
  149. (package
  150. (name "reptyr")
  151. (version "0.6.2")
  152. (source
  153. (origin
  154. (method url-fetch)
  155. (uri (string-append "https://github.com/nelhage/reptyr/archive"
  156. "/reptyr-" version ".tar.gz"))
  157. ;; XXX: To be removed on next reptyr release.
  158. (patches (search-patches "reptyr-fix-gcc-7.patch"))
  159. (sha256
  160. (base32
  161. "07pfl0rkgm8m3f3jy8r9l2yvnhf8lgllpsk3mh57mhzdxq8fagf7"))))
  162. (build-system gnu-build-system)
  163. (arguments
  164. '(#:tests? #f ; no tests
  165. #:make-flags (list "CC=gcc"
  166. (string-append "PREFIX=" %output))
  167. #:phases (modify-phases %standard-phases (delete 'configure))))
  168. (home-page "https://github.com/nelhage/reptyr")
  169. (synopsis "Tool for reparenting a running program to a new terminal")
  170. (description
  171. "reptyr is a utility for taking an existing running program and attaching
  172. it to a new terminal. Started a long-running process over @code{ssh}, but have
  173. to leave and don't want to interrupt it? Just start a @code{screen}, use
  174. reptyr to grab it, and then kill the @code{ssh} session and head on home.")
  175. ;; Reptyr currently does not support mips or aarch64.
  176. (supported-systems (fold delete %supported-systems
  177. '("mips64el-linux" "aarch64-linux")))
  178. (license expat)))