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>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
46 (uri (string-append "http://download.tuxfamily.org/" name "/"
47 name "_" version ".tar.xz"))
50 "1bmcjl1x1rdh514q9z3hzyjmjmwwwkziipjpjsl301bwmiwrd8a8"))))
51 (build-system gnu-build-system)
53 `(("makeinfo" ,texinfo)
54 ("pkg-config" ,pkg-config)
56 ("autoconf" ,autoconf-wrapper)
57 ("automake" ,automake)
58 ("libtool" ,libtool)))
63 ("readline" ,readline)))
65 (list (search-path-specification
66 (variable "REP_DL_LOAD_PATH")
67 (files '("lib/rep")))))
68 (home-page "http://sawfish.wikia.com/wiki/Librep")
69 (synopsis "Lisp system for sawfish")
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.")
79 (define-public rep-gtk
85 (uri (string-append "https://download.tuxfamily.org/librep/"
86 name "/" name "_" version ".tar.xz"))
89 "0hgkkywm8zczir3lqr727bn7ybgg71x9cwj1av8fykkr8pdpard9"))
90 (modules '((guix build utils)))
93 (substitute* "Makefile.in"
94 (("installdir=\\$\\(repexecdir\\)")
95 ;; Install libraries for librep to $out/lib/rep.
96 "installdir=$(libdir)/rep"))
98 (build-system gnu-build-system)
100 `(#:tests? #f ; no tests
102 (modify-phases %standard-phases
103 (add-before 'bootstrap 'remove-autogen
105 ;; Remove autogen.sh so that the bootstrap phase can run
107 (delete-file "autogen.sh")
110 `(("autoconf" ,autoconf)
111 ("automake" ,automake)
113 ("pkg-config" ,pkg-config)))
115 ;; required by rep-gtk.pc.
118 (home-page "https://sawfish.fandom.com/wiki/Rep-GTK")
119 (synopsis "GTK+ binding for librep")
121 "Rep-GTK is a GTK+ (and GLib, GDK) binding to the librep, and one of the
122 backend of Sawfish.")
125 (define-public sawfish
131 (uri (string-append "https://download.tuxfamily.org/sawfish/"
132 name "_" version ".tar.xz"))
135 "1z7awzgw8d15aw17kpbj460pcxq8l2rhkaxk47w7yg9qrmg0xja4"))
136 (modules '((guix build utils)))
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"))
148 (build-system gnu-build-system)
150 '(#:tests? #f ; no tests
152 (modify-phases %standard-phases
153 (add-before 'configure 'patch-exec-rep
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"))))
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"))
178 `(("gettext" ,gettext-minimal)
179 ("makeinfo" ,texinfo)
180 ("pkg-config" ,pkg-config)
185 ("libxinerama" ,libxinerama)
186 ("libxrandr" ,libxrandr)
188 ("rep-gtk" ,rep-gtk)))
189 (home-page "https://sawfish.tuxfamily.org")
190 (synopsis "Configurable window manager")
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