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>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages sawfish)
21 #:use-module ((guix licenses) #:select (gpl2+))
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages autotools)
27 #:use-module (gnu packages dbm)
28 #:use-module (gnu packages gettext)
29 #:use-module (gnu packages gtk)
30 #:use-module (gnu packages libffi)
31 #:use-module (gnu packages multiprecision)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages readline)
34 #:use-module (gnu packages texinfo)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages xorg))
44 (uri (string-append "http://download.tuxfamily.org/" name "/"
45 name "_" version ".tar.xz"))
48 "1bmcjl1x1rdh514q9z3hzyjmjmwwwkziipjpjsl301bwmiwrd8a8"))))
49 (build-system gnu-build-system)
51 `(("makeinfo" ,texinfo)
52 ("pkg-config" ,pkg-config)
54 ("autoconf" ,autoconf-wrapper)
55 ("automake" ,automake)
56 ("libtool" ,libtool)))
61 ("readline" ,readline)))
63 (list (search-path-specification
64 (variable "REP_DL_LOAD_PATH")
65 (files '("lib/rep")))))
66 (home-page "http://sawfish.wikia.com/wiki/Librep")
67 (synopsis "Lisp system for sawfish")
69 "Librep is a dialect of Lisp, designed to be used both as an extension
70 language for applications and as a general purpose programming language. It
71 was originally written to be mostly-compatible with Emacs Lisp, but has
72 subsequently diverged markedly. Its aim is to combine the best features of
73 Scheme and Common Lisp and provide an environment that is comfortable for
74 implementing both small and large scale systems.")
77 (define-public rep-gtk
83 (uri (string-append "http://download.tuxfamily.org/librep/"
84 name "/" name "_" version ".tar.xz"))
87 "0qslm2isyv22hffdpw0nh7xk8jw8cj3h5y7d40c9h5r833w7j6sz"))
88 (modules '((guix build utils)))
91 (substitute* "Makefile.in"
92 (("installdir=\\$\\(repexecdir\\)")
93 ;; Install libraries for librep to $out/lib/rep.
94 "installdir=$(libdir)/rep"))
96 (build-system gnu-build-system)
97 (arguments '(#:tests? #f)) ; no tests
99 `(("pkg-config" ,pkg-config)))
101 ;; required by rep-gtk.pc.
104 (home-page "http://sawfish.wikia.com/wiki/Rep-GTK")
105 (synopsis "GTK+ binding for librep")
107 "Rep-GTK is a GTK+ (and GLib, GDK) binding to the librep, and one of the
108 backend of Sawfish.")
111 (define-public sawfish
117 (uri (string-append "http://download.tuxfamily.org/sawfish/"
118 name "_" version ".tar.xz"))
121 "0wp4m0p836a0rysbcdqb6z5hxlxqj3rgdbks3bs44rlssx0mcvyg"))
122 (modules '((guix build utils)))
125 (substitute* "Makedefs.in"
126 (("/bin/sh") "@SHELL@")
127 (("REP_DL_LOAD_PATH=")
128 ;; To find rep-gtk when building sawfish.
129 "REP_DL_LOAD_PATH=$(REP_DL_LOAD_PATH):"))
130 (substitute* "src/Makefile.in"
131 ;; Install libraries for librep to $out/lib/rep.
132 (("\\$\\(repexecdir\\)") "$(libdir)/rep"))
134 (build-system gnu-build-system)
136 '(#:tests? #f ; no tests
138 (modify-phases %standard-phases
139 (add-before 'configure 'patch-exec-rep
141 (substitute* '("lisp/sawfish/cfg/main.jl.in"
142 "scripts/sawfish-about.jl.in"
143 "scripts/sawfish-client.jl"
144 "scripts/sawfish-menu.jl")
145 (("exec rep") (string-append "exec " (which "rep"))))
147 (add-after 'install 'wrap-scripts
148 ;; Wrap scripts with REP_DL_LOAD_PATH for finding rep-gtk
149 ;; and sawfish.client.
150 (lambda* (#:key outputs #:allow-other-keys)
151 (define (wrap-script script)
152 (let ((out (assoc-ref outputs "out")))
153 (wrap-program (string-append out script)
154 `("REP_DL_LOAD_PATH" =
155 ,(list (getenv "REP_DL_LOAD_PATH")
156 (string-append out "/lib/rep"))))))
157 (for-each wrap-script
158 (list "/bin/sawfish-about"
159 "/bin/sawfish-client"
160 "/bin/sawfish-config"
161 "/lib/sawfish/sawfish-menu"))
164 `(("gettext" ,gettext-minimal)
165 ("makeinfo" ,texinfo)
166 ("pkg-config" ,pkg-config)
171 ("libxinerama" ,libxinerama)
172 ("libxrandr" ,libxrandr)
174 ("rep-gtk" ,rep-gtk)))
175 (home-page "http://sawfish.wikia.com/wiki/Main_Page")
176 (synopsis "Configurable window manager")
178 "Sawfish is an extensible window manager using a Lisp-based scripting
179 language. Its policy is very minimal compared to most window managers. Its aim
180 is simply to manage windows in the most flexible and attractive manner possible.
181 All high-level WM functions are implemented in Lisp for future extensibility or