gnu: icecat: Update to 78.10.0-guix0-preview1 [security fixes].
[jackhill/guix/guix.git] / gnu / packages / sawfish.scm
CommitLineData
93dc836f
SB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
11b1f89e 3;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
edccf761 4;;; Copyright © 2019 Benjamin Slade <slade@jnanam.net>
4ffed734 5;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
93dc836f
SB
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)
b99eec83 28 #:use-module (gnu packages autotools)
255d1bbe 29 #:use-module (gnu packages dbm)
ca2eebbd 30 #:use-module (gnu packages gettext)
a0aa8d0b 31 #:use-module (gnu packages gtk)
93dc836f
SB
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)
ca2eebbd 36 #:use-module (gnu packages texinfo)
ce0614dd 37 #:use-module (gnu packages base)
ca2eebbd 38 #:use-module (gnu packages xorg))
93dc836f
SB
39
40(define-public librep
41 (package
42 (name "librep")
11b1f89e 43 (version "0.92.7")
93dc836f
SB
44 (source (origin
45 (method url-fetch)
416d098a
TGR
46 (uri (string-append "http://download.tuxfamily.org/librep/"
47 "librep_" version ".tar.xz"))
93dc836f
SB
48 (sha256
49 (base32
11b1f89e 50 "1bmcjl1x1rdh514q9z3hzyjmjmwwwkziipjpjsl301bwmiwrd8a8"))))
93dc836f
SB
51 (build-system gnu-build-system)
52 (native-inputs
53 `(("makeinfo" ,texinfo)
b99eec83
LC
54 ("pkg-config" ,pkg-config)
55
ce10e2b3 56 ("autoconf" ,autoconf)
b99eec83
LC
57 ("automake" ,automake)
58 ("libtool" ,libtool)))
93dc836f
SB
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")))))
131f0f85 68 (home-page "https://sawfish.fandom.com/wiki/Librep")
93dc836f
SB
69 (synopsis "Lisp system for sawfish")
70 (description
71 "Librep is a dialect of Lisp, designed to be used both as an extension
72language for applications and as a general purpose programming language. It
73was originally written to be mostly-compatible with Emacs Lisp, but has
74subsequently diverged markedly. Its aim is to combine the best features of
75Scheme and Common Lisp and provide an environment that is comfortable for
76implementing both small and large scale systems.")
77 (license gpl2+)))
a0aa8d0b
SB
78
79(define-public rep-gtk
80 (package
81 (name "rep-gtk")
4ffed734 82 (version "0.90.8.3")
a0aa8d0b
SB
83 (source (origin
84 (method url-fetch)
4ffed734 85 (uri (string-append "https://download.tuxfamily.org/librep/"
a0aa8d0b
SB
86 name "/" name "_" version ".tar.xz"))
87 (sha256
88 (base32
4ffed734 89 "0hgkkywm8zczir3lqr727bn7ybgg71x9cwj1av8fykkr8pdpard9"))
a0aa8d0b
SB
90 (modules '((guix build utils)))
91 (snippet
6cbee49d
MW
92 '(begin
93 (substitute* "Makefile.in"
94 (("installdir=\\$\\(repexecdir\\)")
95 ;; Install libraries for librep to $out/lib/rep.
96 "installdir=$(libdir)/rep"))
97 #t))))
a0aa8d0b 98 (build-system gnu-build-system)
4ffed734
AI
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)))))
a0aa8d0b 109 (native-inputs
4ffed734
AI
110 `(("autoconf" ,autoconf)
111 ("automake" ,automake)
112 ("libtool" ,libtool)
113 ("pkg-config" ,pkg-config)))
a0aa8d0b
SB
114 (propagated-inputs
115 ;; required by rep-gtk.pc.
116 `(("gtk+" ,gtk+-2)
117 ("librep" ,librep)))
4ffed734 118 (home-page "https://sawfish.fandom.com/wiki/Rep-GTK")
a0aa8d0b
SB
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
122backend of Sawfish.")
123 (license gpl2+)))
ca2eebbd
SB
124
125(define-public sawfish
126 (package
127 (name "sawfish")
edccf761 128 (version "1.12.0")
ca2eebbd
SB
129 (source (origin
130 (method url-fetch)
edccf761 131 (uri (string-append "https://download.tuxfamily.org/sawfish/"
ca2eebbd
SB
132 name "_" version ".tar.xz"))
133 (sha256
134 (base32
edccf761 135 "1z7awzgw8d15aw17kpbj460pcxq8l2rhkaxk47w7yg9qrmg0xja4"))
ca2eebbd
SB
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.
6cbee49d
MW
146 (("\\$\\(repexecdir\\)") "$(libdir)/rep"))
147 #t))))
ca2eebbd
SB
148 (build-system gnu-build-system)
149 (arguments
150 '(#:tests? #f ; no tests
151 #:phases
dc1d3cde
KK
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)))))
ca2eebbd 177 (native-inputs
b94a6ca0 178 `(("gettext" ,gettext-minimal)
ca2eebbd
SB
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)))
edccf761 189 (home-page "https://sawfish.tuxfamily.org")
ca2eebbd
SB
190 (synopsis "Configurable window manager")
191 (description
192 "Sawfish is an extensible window manager using a Lisp-based scripting
193language. Its policy is very minimal compared to most window managers. Its aim
194is simply to manage windows in the most flexible and attractive manner possible.
195All high-level WM functions are implemented in Lisp for future extensibility or
196redefinition.")
197 (license gpl2+)))