1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages sawfish)
20 #:use-module ((guix licenses) #:select (gpl2+))
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages databases)
26 #:use-module (gnu packages gettext)
27 #:use-module (gnu packages gtk)
28 #:use-module (gnu packages libffi)
29 #:use-module (gnu packages multiprecision)
30 #:use-module (gnu packages pkg-config)
31 #:use-module (gnu packages readline)
32 #:use-module (gnu packages texinfo)
33 #:use-module (gnu packages base)
34 #:use-module (gnu packages xorg))
42 (uri (string-append "http://download.tuxfamily.org/" name "/"
43 name "_" version ".tar.xz"))
46 "0zsy5gi8kvz5vq41y5rzm6lfi3dpiwbg4diwb6d30qfi72mrpni2"))))
47 (build-system gnu-build-system)
49 `(("makeinfo" ,texinfo)
50 ("pkg-config" ,pkg-config)))
55 ("readline" ,readline)))
57 (list (search-path-specification
58 (variable "REP_DL_LOAD_PATH")
59 (files '("lib/rep")))))
60 (home-page "http://sawfish.wikia.com/wiki/Librep")
61 (synopsis "Lisp system for sawfish")
63 "Librep is a dialect of Lisp, designed to be used both as an extension
64 language for applications and as a general purpose programming language. It
65 was originally written to be mostly-compatible with Emacs Lisp, but has
66 subsequently diverged markedly. Its aim is to combine the best features of
67 Scheme and Common Lisp and provide an environment that is comfortable for
68 implementing both small and large scale systems.")
71 (define-public rep-gtk
77 (uri (string-append "http://download.tuxfamily.org/librep/"
78 name "/" name "_" version ".tar.xz"))
81 "0qslm2isyv22hffdpw0nh7xk8jw8cj3h5y7d40c9h5r833w7j6sz"))
82 (modules '((guix build utils)))
84 '(substitute* "Makefile.in"
85 (("installdir=\\$\\(repexecdir\\)")
86 ;; Install libraries for librep to $out/lib/rep.
87 "installdir=$(libdir)/rep")))))
88 (build-system gnu-build-system)
89 (arguments '(#:tests? #f)) ; no tests
91 `(("pkg-config" ,pkg-config)))
93 ;; required by rep-gtk.pc.
96 (home-page "http://sawfish.wikia.com/wiki/Rep-GTK")
97 (synopsis "GTK+ binding for librep")
99 "Rep-GTK is a GTK+ (and GLib, GDK) binding to the librep, and one of the
100 backend of Sawfish.")
103 (define-public sawfish
109 (uri (string-append "http://download.tuxfamily.org/sawfish/"
110 name "_" version ".tar.xz"))
113 "0wp4m0p836a0rysbcdqb6z5hxlxqj3rgdbks3bs44rlssx0mcvyg"))
114 (modules '((guix build utils)))
117 (substitute* "Makedefs.in"
118 (("/bin/sh") "@SHELL@")
119 (("REP_DL_LOAD_PATH=")
120 ;; To find rep-gtk when building sawfish.
121 "REP_DL_LOAD_PATH=$(REP_DL_LOAD_PATH):"))
122 (substitute* "src/Makefile.in"
123 ;; Install libraries for librep to $out/lib/rep.
124 (("\\$\\(repexecdir\\)") "$(libdir)/rep"))))))
125 (build-system gnu-build-system)
127 '(#:tests? #f ; no tests
130 'configure 'patch-exec-rep
132 (substitute* '("lisp/sawfish/cfg/main.jl.in"
133 "scripts/sawfish-about.jl.in"
134 "scripts/sawfish-client.jl"
135 "scripts/sawfish-menu.jl")
136 (("exec rep") (string-append "exec " (which "rep")))))
138 'install 'wrap-scripts
139 ;; Wrap scripts with REP_DL_LOAD_PATH for finding rep-gtk
140 ;; and sawfish.client.
141 (lambda* (#:key outputs #:allow-other-keys)
142 (define (wrap-script script)
143 (let ((out (assoc-ref outputs "out")))
144 (wrap-program (string-append out script)
145 `("REP_DL_LOAD_PATH" =
146 ,(list (getenv "REP_DL_LOAD_PATH")
147 (string-append out "/lib/rep"))))))
148 (for-each wrap-script
149 (list "/bin/sawfish-about"
150 "/bin/sawfish-client"
151 "/bin/sawfish-config"
152 "/lib/sawfish/sawfish-menu")))
155 `(("gettext" ,gnu-gettext)
156 ("makeinfo" ,texinfo)
157 ("pkg-config" ,pkg-config)
162 ("libxinerama" ,libxinerama)
163 ("libxrandr" ,libxrandr)
165 ("rep-gtk" ,rep-gtk)))
166 (home-page "http://sawfish.wikia.com/wiki/Main_Page")
167 (synopsis "Configurable window manager")
169 "Sawfish is an extensible window manager using a Lisp-based scripting
170 language. Its policy is very minimal compared to most window managers. Its aim
171 is simply to manage windows in the most flexible and attractive manner possible.
172 All high-level WM functions are implemented in Lisp for future extensibility or