projects/guix·blob javascript-team · refs

107 lines · 4.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2019 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015 Mathieu Lirzin <[email protected]>
4;;; Copyright © 2017 Mathieu Othacehe <[email protected]>
5;;; Copyright © 2022 Maxim Cournoyer <[email protected]>
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages ratpoison)
23 #:use-module (guix download)
24 #:use-module (guix gexp)
25 #:use-module (guix packages)
26 #:use-module (guix build-system gnu)
27 #:use-module ((guix licenses) #:select (gpl2+))
28 #:use-module (gnu packages)
29 #:use-module (gnu packages xorg)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages readline)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages fontutils))
34
35(define-public ratpoison
36 (package
37 (name "ratpoison")
38 (version "1.4.9")
39 (source
40 (origin (method url-fetch)
41 (uri (string-append "mirror://savannah/ratpoison/ratpoison-"
42 version ".tar.xz"))
43 (sha256
44 (base32
45 "1wfir1gvh5h7izgvx2kd1pr2k7wlncd33zq7qi9s9k2y0aza93yr"))
46 (patches (search-patches "ratpoison-shell.patch"))))
47 (build-system gnu-build-system)
48 (arguments
49 (list
50 #:modules `((ice-9 format)
51 ,@%default-gnu-modules)
52 ;; Specify the absolute location of xterm, as the user experience sucks
53 ;; when no terminal is available (can't consult help with 'C-t ?', for
54 ;; example).
55 #:configure-flags
56 #~(list (string-append "--with-xterm="
57 (search-input-file %build-inputs "bin/xterm")))
58 #:phases
59 #~(modify-phases %standard-phases
60 (add-after 'install 'install-xsession
61 (lambda _
62 ;; Add a .desktop file to xsessions.
63 (let ((xsessions (string-append #$output "/share/xsessions")))
64 (mkdir-p xsessions)
65 (call-with-output-file (string-append xsessions
66 "/ratpoison.desktop")
67 (lambda (port)
68 (format port
69 "[Desktop Entry]~@
70 Name=ratpoison~@
71 Comment=Tiling window manager: say goodbye to the rodent!~@
72 Exec=~a/bin/ratpoison~@
73 TryExec=~@*~a/bin/ratpoison~@
74 Type=Application~%"
75 #$output)))))))))
76 (inputs
77 (list fontconfig
78 freetype
79 libxft
80 libxi
81 libxrandr
82 libxpm
83 libxt
84 libxtst
85 libx11
86 readline
87 xorgproto
88 xterm))
89 (native-inputs
90 (list perl
91 pkg-config))
92 (home-page "https://www.nongnu.org/ratpoison/")
93 (synopsis "Simple mouse-free tiling window manager")
94 (description
95 "Ratpoison is a simple window manager with no fat library
96dependencies, no fancy graphics, no window decorations, and no
97rodent dependence. It is largely modelled after GNU Screen which
98has done wonders in the virtual terminal market.
99
100The screen can be split into non-overlapping frames. All windows
101are kept maximized inside their frames to take full advantage of
102your precious screen real estate.
103
104All interaction with the window manager is done through keystrokes.
105Ratpoison has a prefix map to minimize the key clobbering that
106cripples Emacs and other quality pieces of software.")
107 (license gpl2+)))