Commit | Line | Data |
---|---|---|
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 | 59 | (inputs |
8394619b | 60 | (list gdbm gmp libffi readline)) |
93dc836f SB |
61 | (native-search-paths |
62 | (list (search-path-specification | |
63 | (variable "REP_DL_LOAD_PATH") | |
64 | (files '("lib/rep"))))) | |
131f0f85 | 65 | (home-page "https://sawfish.fandom.com/wiki/Librep") |
93dc836f SB |
66 | (synopsis "Lisp system for sawfish") |
67 | (description | |
68 | "Librep is a dialect of Lisp, designed to be used both as an extension | |
69 | language for applications and as a general purpose programming language. It | |
70 | was originally written to be mostly-compatible with Emacs Lisp, but has | |
71 | subsequently diverged markedly. Its aim is to combine the best features of | |
72 | Scheme and Common Lisp and provide an environment that is comfortable for | |
73 | implementing both small and large scale systems.") | |
74 | (license gpl2+))) | |
a0aa8d0b SB |
75 | |
76 | (define-public rep-gtk | |
77 | (package | |
78 | (name "rep-gtk") | |
4ffed734 | 79 | (version "0.90.8.3") |
a0aa8d0b SB |
80 | (source (origin |
81 | (method url-fetch) | |
4ffed734 | 82 | (uri (string-append "https://download.tuxfamily.org/librep/" |
a0aa8d0b SB |
83 | name "/" name "_" version ".tar.xz")) |
84 | (sha256 | |
85 | (base32 | |
4ffed734 | 86 | "0hgkkywm8zczir3lqr727bn7ybgg71x9cwj1av8fykkr8pdpard9")) |
a0aa8d0b SB |
87 | (modules '((guix build utils))) |
88 | (snippet | |
6cbee49d MW |
89 | '(begin |
90 | (substitute* "Makefile.in" | |
91 | (("installdir=\\$\\(repexecdir\\)") | |
92 | ;; Install libraries for librep to $out/lib/rep. | |
93 | "installdir=$(libdir)/rep")) | |
94 | #t)))) | |
a0aa8d0b | 95 | (build-system gnu-build-system) |
4ffed734 AI |
96 | (arguments |
97 | `(#:tests? #f ; no tests | |
98 | #:phases | |
99 | (modify-phases %standard-phases | |
100 | (add-before 'bootstrap 'remove-autogen | |
101 | (lambda _ | |
102 | ;; Remove autogen.sh so that the bootstrap phase can run | |
103 | ;; autoreconf. | |
104 | (delete-file "autogen.sh") | |
105 | #t))))) | |
a0aa8d0b | 106 | (native-inputs |
8394619b | 107 | (list autoconf automake libtool pkg-config)) |
a0aa8d0b SB |
108 | (propagated-inputs |
109 | ;; required by rep-gtk.pc. | |
8394619b | 110 | (list gtk+-2 librep)) |
4ffed734 | 111 | (home-page "https://sawfish.fandom.com/wiki/Rep-GTK") |
a0aa8d0b SB |
112 | (synopsis "GTK+ binding for librep") |
113 | (description | |
114 | "Rep-GTK is a GTK+ (and GLib, GDK) binding to the librep, and one of the | |
115 | backend of Sawfish.") | |
116 | (license gpl2+))) | |
ca2eebbd SB |
117 | |
118 | (define-public sawfish | |
119 | (package | |
120 | (name "sawfish") | |
edccf761 | 121 | (version "1.12.0") |
ca2eebbd SB |
122 | (source (origin |
123 | (method url-fetch) | |
edccf761 | 124 | (uri (string-append "https://download.tuxfamily.org/sawfish/" |
ca2eebbd SB |
125 | name "_" version ".tar.xz")) |
126 | (sha256 | |
127 | (base32 | |
edccf761 | 128 | "1z7awzgw8d15aw17kpbj460pcxq8l2rhkaxk47w7yg9qrmg0xja4")) |
ca2eebbd SB |
129 | (modules '((guix build utils))) |
130 | (snippet | |
131 | '(begin | |
132 | (substitute* "Makedefs.in" | |
133 | (("/bin/sh") "@SHELL@") | |
134 | (("REP_DL_LOAD_PATH=") | |
135 | ;; To find rep-gtk when building sawfish. | |
136 | "REP_DL_LOAD_PATH=$(REP_DL_LOAD_PATH):")) | |
137 | (substitute* "src/Makefile.in" | |
138 | ;; Install libraries for librep to $out/lib/rep. | |
6cbee49d MW |
139 | (("\\$\\(repexecdir\\)") "$(libdir)/rep")) |
140 | #t)))) | |
ca2eebbd SB |
141 | (build-system gnu-build-system) |
142 | (arguments | |
143 | '(#:tests? #f ; no tests | |
144 | #:phases | |
dc1d3cde KK |
145 | (modify-phases %standard-phases |
146 | (add-before 'configure 'patch-exec-rep | |
147 | (lambda _ | |
148 | (substitute* '("lisp/sawfish/cfg/main.jl.in" | |
149 | "scripts/sawfish-about.jl.in" | |
150 | "scripts/sawfish-client.jl" | |
151 | "scripts/sawfish-menu.jl") | |
152 | (("exec rep") (string-append "exec " (which "rep")))) | |
153 | #t)) | |
154 | (add-after 'install 'wrap-scripts | |
155 | ;; Wrap scripts with REP_DL_LOAD_PATH for finding rep-gtk | |
156 | ;; and sawfish.client. | |
157 | (lambda* (#:key outputs #:allow-other-keys) | |
158 | (define (wrap-script script) | |
159 | (let ((out (assoc-ref outputs "out"))) | |
160 | (wrap-program (string-append out script) | |
161 | `("REP_DL_LOAD_PATH" = | |
162 | ,(list (getenv "REP_DL_LOAD_PATH") | |
163 | (string-append out "/lib/rep")))))) | |
164 | (for-each wrap-script | |
165 | (list "/bin/sawfish-about" | |
166 | "/bin/sawfish-client" | |
167 | "/bin/sawfish-config" | |
168 | "/lib/sawfish/sawfish-menu")) | |
169 | #t))))) | |
ca2eebbd | 170 | (native-inputs |
b94a6ca0 | 171 | `(("gettext" ,gettext-minimal) |
ca2eebbd SB |
172 | ("makeinfo" ,texinfo) |
173 | ("pkg-config" ,pkg-config) | |
174 | ("which" ,which))) | |
175 | (inputs | |
8394619b LC |
176 | (list libsm |
177 | libxft | |
178 | libxinerama | |
179 | libxrandr | |
180 | libxtst | |
181 | rep-gtk)) | |
edccf761 | 182 | (home-page "https://sawfish.tuxfamily.org") |
ca2eebbd SB |
183 | (synopsis "Configurable window manager") |
184 | (description | |
185 | "Sawfish is an extensible window manager using a Lisp-based scripting | |
186 | language. Its policy is very minimal compared to most window managers. Its aim | |
187 | is simply to manage windows in the most flexible and attractive manner possible. | |
188 | All high-level WM functions are implemented in Lisp for future extensibility or | |
189 | redefinition.") | |
190 | (license gpl2+))) |