Commit | Line | Data |
---|---|---|
93dc836f SB |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> | |
3 | ;;; | |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
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. | |
10 | ;;; | |
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. | |
15 | ;;; | |
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/>. | |
18 | ||
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) | |
b416aadf | 25 | #:use-module (gnu packages databases) |
ca2eebbd | 26 | #:use-module (gnu packages gettext) |
a0aa8d0b | 27 | #:use-module (gnu packages gtk) |
93dc836f SB |
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) | |
ca2eebbd | 32 | #:use-module (gnu packages texinfo) |
ce0614dd | 33 | #:use-module (gnu packages base) |
ca2eebbd | 34 | #:use-module (gnu packages xorg)) |
93dc836f SB |
35 | |
36 | (define-public librep | |
37 | (package | |
38 | (name "librep") | |
c2a362be | 39 | (version "0.92.5") |
93dc836f SB |
40 | (source (origin |
41 | (method url-fetch) | |
42 | (uri (string-append "http://download.tuxfamily.org/" name "/" | |
43 | name "_" version ".tar.xz")) | |
44 | (sha256 | |
45 | (base32 | |
c2a362be | 46 | "0zsy5gi8kvz5vq41y5rzm6lfi3dpiwbg4diwb6d30qfi72mrpni2")))) |
93dc836f SB |
47 | (build-system gnu-build-system) |
48 | (native-inputs | |
49 | `(("makeinfo" ,texinfo) | |
50 | ("pkg-config" ,pkg-config))) | |
51 | (inputs | |
52 | `(("gdbm" ,gdbm) | |
53 | ("gmp" ,gmp) | |
54 | ("libffi" ,libffi) | |
55 | ("readline" ,readline))) | |
56 | (native-search-paths | |
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") | |
62 | (description | |
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.") | |
69 | (license gpl2+))) | |
a0aa8d0b SB |
70 | |
71 | (define-public rep-gtk | |
72 | (package | |
73 | (name "rep-gtk") | |
74 | (version "0.90.8.2") | |
75 | (source (origin | |
76 | (method url-fetch) | |
77 | (uri (string-append "http://download.tuxfamily.org/librep/" | |
78 | name "/" name "_" version ".tar.xz")) | |
79 | (sha256 | |
80 | (base32 | |
81 | "0qslm2isyv22hffdpw0nh7xk8jw8cj3h5y7d40c9h5r833w7j6sz")) | |
82 | (modules '((guix build utils))) | |
83 | (snippet | |
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 | |
90 | (native-inputs | |
91 | `(("pkg-config" ,pkg-config))) | |
92 | (propagated-inputs | |
93 | ;; required by rep-gtk.pc. | |
94 | `(("gtk+" ,gtk+-2) | |
95 | ("librep" ,librep))) | |
96 | (home-page "http://sawfish.wikia.com/wiki/Rep-GTK") | |
97 | (synopsis "GTK+ binding for librep") | |
98 | (description | |
99 | "Rep-GTK is a GTK+ (and GLib, GDK) binding to the librep, and one of the | |
100 | backend of Sawfish.") | |
101 | (license gpl2+))) | |
ca2eebbd SB |
102 | |
103 | (define-public sawfish | |
104 | (package | |
105 | (name "sawfish") | |
106 | (version "1.11") | |
107 | (source (origin | |
108 | (method url-fetch) | |
109 | (uri (string-append "http://download.tuxfamily.org/sawfish/" | |
110 | name "_" version ".tar.xz")) | |
111 | (sha256 | |
112 | (base32 | |
113 | "0wp4m0p836a0rysbcdqb6z5hxlxqj3rgdbks3bs44rlssx0mcvyg")) | |
114 | (modules '((guix build utils))) | |
115 | (snippet | |
116 | '(begin | |
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) | |
126 | (arguments | |
127 | '(#:tests? #f ; no tests | |
128 | #:phases | |
129 | (alist-cons-before | |
130 | 'configure 'patch-exec-rep | |
131 | (lambda _ | |
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"))))) | |
137 | (alist-cons-after | |
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"))) | |
153 | %standard-phases)))) | |
154 | (native-inputs | |
b94a6ca0 | 155 | `(("gettext" ,gettext-minimal) |
ca2eebbd SB |
156 | ("makeinfo" ,texinfo) |
157 | ("pkg-config" ,pkg-config) | |
158 | ("which" ,which))) | |
159 | (inputs | |
160 | `(("libsm" ,libsm) | |
161 | ("libxft" ,libxft) | |
162 | ("libxinerama" ,libxinerama) | |
163 | ("libxrandr" ,libxrandr) | |
164 | ("libxtst" ,libxtst) | |
165 | ("rep-gtk" ,rep-gtk))) | |
166 | (home-page "http://sawfish.wikia.com/wiki/Main_Page") | |
167 | (synopsis "Configurable window manager") | |
168 | (description | |
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 | |
173 | redefinition.") | |
174 | (license gpl2+))) |