gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / sawfish.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019 Benjamin Slade <slade@jnanam.net>
5 ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
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 sawfish)
23 #:use-module ((guix licenses) #:select (gpl2+))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages dbm)
30 #:use-module (gnu packages gettext)
31 #:use-module (gnu packages gtk)
32 #:use-module (gnu packages libffi)
33 #:use-module (gnu packages multiprecision)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages readline)
36 #:use-module (gnu packages texinfo)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages xorg))
39
40 (define-public librep
41 (package
42 (name "librep")
43 (version "0.92.7")
44 (source (origin
45 (method url-fetch)
46 (uri (string-append "http://download.tuxfamily.org/librep/"
47 "librep_" version ".tar.xz"))
48 (sha256
49 (base32
50 "1bmcjl1x1rdh514q9z3hzyjmjmwwwkziipjpjsl301bwmiwrd8a8"))))
51 (build-system gnu-build-system)
52 (native-inputs
53 `(("makeinfo" ,texinfo)
54 ("pkg-config" ,pkg-config)
55
56 ("autoconf" ,autoconf)
57 ("automake" ,automake)
58 ("libtool" ,libtool)))
59 (inputs
60 `(("gdbm" ,gdbm)
61 ("gmp" ,gmp)
62 ("libffi" ,libffi)
63 ("readline" ,readline)))
64 (native-search-paths
65 (list (search-path-specification
66 (variable "REP_DL_LOAD_PATH")
67 (files '("lib/rep")))))
68 (home-page "https://sawfish.fandom.com/wiki/Librep")
69 (synopsis "Lisp system for sawfish")
70 (description
71 "Librep is a dialect of Lisp, designed to be used both as an extension
72 language for applications and as a general purpose programming language. It
73 was originally written to be mostly-compatible with Emacs Lisp, but has
74 subsequently diverged markedly. Its aim is to combine the best features of
75 Scheme and Common Lisp and provide an environment that is comfortable for
76 implementing both small and large scale systems.")
77 (license gpl2+)))
78
79 (define-public rep-gtk
80 (package
81 (name "rep-gtk")
82 (version "0.90.8.3")
83 (source (origin
84 (method url-fetch)
85 (uri (string-append "https://download.tuxfamily.org/librep/"
86 name "/" name "_" version ".tar.xz"))
87 (sha256
88 (base32
89 "0hgkkywm8zczir3lqr727bn7ybgg71x9cwj1av8fykkr8pdpard9"))
90 (modules '((guix build utils)))
91 (snippet
92 '(begin
93 (substitute* "Makefile.in"
94 (("installdir=\\$\\(repexecdir\\)")
95 ;; Install libraries for librep to $out/lib/rep.
96 "installdir=$(libdir)/rep"))
97 #t))))
98 (build-system gnu-build-system)
99 (arguments
100 `(#:tests? #f ; no tests
101 #:phases
102 (modify-phases %standard-phases
103 (add-before 'bootstrap 'remove-autogen
104 (lambda _
105 ;; Remove autogen.sh so that the bootstrap phase can run
106 ;; autoreconf.
107 (delete-file "autogen.sh")
108 #t)))))
109 (native-inputs
110 `(("autoconf" ,autoconf)
111 ("automake" ,automake)
112 ("libtool" ,libtool)
113 ("pkg-config" ,pkg-config)))
114 (propagated-inputs
115 ;; required by rep-gtk.pc.
116 `(("gtk+" ,gtk+-2)
117 ("librep" ,librep)))
118 (home-page "https://sawfish.fandom.com/wiki/Rep-GTK")
119 (synopsis "GTK+ binding for librep")
120 (description
121 "Rep-GTK is a GTK+ (and GLib, GDK) binding to the librep, and one of the
122 backend of Sawfish.")
123 (license gpl2+)))
124
125 (define-public sawfish
126 (package
127 (name "sawfish")
128 (version "1.12.0")
129 (source (origin
130 (method url-fetch)
131 (uri (string-append "https://download.tuxfamily.org/sawfish/"
132 name "_" version ".tar.xz"))
133 (sha256
134 (base32
135 "1z7awzgw8d15aw17kpbj460pcxq8l2rhkaxk47w7yg9qrmg0xja4"))
136 (modules '((guix build utils)))
137 (snippet
138 '(begin
139 (substitute* "Makedefs.in"
140 (("/bin/sh") "@SHELL@")
141 (("REP_DL_LOAD_PATH=")
142 ;; To find rep-gtk when building sawfish.
143 "REP_DL_LOAD_PATH=$(REP_DL_LOAD_PATH):"))
144 (substitute* "src/Makefile.in"
145 ;; Install libraries for librep to $out/lib/rep.
146 (("\\$\\(repexecdir\\)") "$(libdir)/rep"))
147 #t))))
148 (build-system gnu-build-system)
149 (arguments
150 '(#:tests? #f ; no tests
151 #:phases
152 (modify-phases %standard-phases
153 (add-before 'configure 'patch-exec-rep
154 (lambda _
155 (substitute* '("lisp/sawfish/cfg/main.jl.in"
156 "scripts/sawfish-about.jl.in"
157 "scripts/sawfish-client.jl"
158 "scripts/sawfish-menu.jl")
159 (("exec rep") (string-append "exec " (which "rep"))))
160 #t))
161 (add-after 'install 'wrap-scripts
162 ;; Wrap scripts with REP_DL_LOAD_PATH for finding rep-gtk
163 ;; and sawfish.client.
164 (lambda* (#:key outputs #:allow-other-keys)
165 (define (wrap-script script)
166 (let ((out (assoc-ref outputs "out")))
167 (wrap-program (string-append out script)
168 `("REP_DL_LOAD_PATH" =
169 ,(list (getenv "REP_DL_LOAD_PATH")
170 (string-append out "/lib/rep"))))))
171 (for-each wrap-script
172 (list "/bin/sawfish-about"
173 "/bin/sawfish-client"
174 "/bin/sawfish-config"
175 "/lib/sawfish/sawfish-menu"))
176 #t)))))
177 (native-inputs
178 `(("gettext" ,gettext-minimal)
179 ("makeinfo" ,texinfo)
180 ("pkg-config" ,pkg-config)
181 ("which" ,which)))
182 (inputs
183 `(("libsm" ,libsm)
184 ("libxft" ,libxft)
185 ("libxinerama" ,libxinerama)
186 ("libxrandr" ,libxrandr)
187 ("libxtst" ,libxtst)
188 ("rep-gtk" ,rep-gtk)))
189 (home-page "https://sawfish.tuxfamily.org")
190 (synopsis "Configurable window manager")
191 (description
192 "Sawfish is an extensible window manager using a Lisp-based scripting
193 language. Its policy is very minimal compared to most window managers. Its aim
194 is simply to manage windows in the most flexible and attractive manner possible.
195 All high-level WM functions are implemented in Lisp for future extensibility or
196 redefinition.")
197 (license gpl2+)))