Commit | Line | Data |
---|---|---|
bda2ded6 ED |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> | |
6e38c4be | 3 | ;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu> |
0ede252b | 4 | ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org> |
1268e52d | 5 | ;;; Copyright © 2015 xd1le <elisp.vim@gmail.com> |
ca80b8ba | 6 | ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> |
0ede252b | 7 | ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org> |
560c0795 | 8 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
766a22fb | 9 | ;;; Copyright © 2016 Al McElrath <hello@yrns.org> |
3d1240aa CZ |
10 | ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au> |
11 | ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> | |
c4dd0def | 12 | ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is> |
22037a32 | 13 | ;;; Copyright © 2016 doncatnip <gnopap@gmail.com> |
37356e0b | 14 | ;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net> |
bda2ded6 ED |
15 | ;;; |
16 | ;;; This file is part of GNU Guix. | |
17 | ;;; | |
18 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
19 | ;;; under the terms of the GNU General Public License as published by | |
20 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
21 | ;;; your option) any later version. | |
22 | ;;; | |
23 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
24 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
26 | ;;; GNU General Public License for more details. | |
27 | ;;; | |
28 | ;;; You should have received a copy of the GNU General Public License | |
29 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
30 | ||
31 | (define-module (gnu packages wm) | |
0ede252b | 32 | #:use-module ((guix licenses) #:prefix license:) |
bda2ded6 | 33 | #:use-module (guix packages) |
c595cd47 | 34 | #:use-module (gnu packages) |
bda2ded6 | 35 | #:use-module (gnu packages linux) |
3d1240aa | 36 | #:use-module (guix build-system cmake) |
bda2ded6 | 37 | #:use-module (guix build-system gnu) |
6e38c4be | 38 | #:use-module (guix build-system haskell) |
c165591d | 39 | #:use-module (guix build-system python) |
6e38c4be | 40 | #:use-module (gnu packages haskell) |
bda2ded6 ED |
41 | #:use-module (gnu packages base) |
42 | #:use-module (gnu packages pkg-config) | |
43 | #:use-module (gnu packages perl) | |
766a22fb | 44 | #:use-module (gnu packages pulseaudio) |
bda2ded6 ED |
45 | #:use-module (gnu packages xorg) |
46 | #:use-module (gnu packages xdisorg) | |
99828fa7 | 47 | #:use-module (gnu packages documentation) |
bda2ded6 ED |
48 | #:use-module (gnu packages xml) |
49 | #:use-module (gnu packages m4) | |
50 | #:use-module (gnu packages docbook) | |
0ede252b | 51 | #:use-module (gnu packages image) |
bda2ded6 ED |
52 | #:use-module (gnu packages pcre) |
53 | #:use-module (gnu packages gtk) | |
54 | #:use-module (gnu packages libevent) | |
0ede252b | 55 | #:use-module (gnu packages fribidi) |
bda2ded6 ED |
56 | #:use-module (gnu packages maths) |
57 | #:use-module (gnu packages web) | |
0ede252b | 58 | #:use-module (gnu packages fontutils) |
3d1240aa CZ |
59 | #:use-module (gnu packages freedesktop) |
60 | #:use-module (gnu packages glib) | |
61 | #:use-module (gnu packages gperf) | |
62 | #:use-module (gnu packages imagemagick) | |
63 | #:use-module (gnu packages lua) | |
37356e0b | 64 | #:use-module (gnu packages suckless) |
bda2ded6 ED |
65 | #:use-module (guix download) |
66 | #:use-module (guix git-download)) | |
67 | ||
5c37126f ED |
68 | (define-public libconfuse |
69 | (package | |
70 | (name "libconfuse") | |
71 | (version "2.7") | |
72 | (source (origin | |
73 | (method url-fetch) | |
74 | (uri (string-append "http://savannah.nongnu.org/download/confuse/" | |
75 | "confuse-" version ".tar.gz")) | |
76 | (sha256 | |
77 | (base32 | |
78 | "0y47r2ashz44wvnxdb18ivpmj8nxhw3y9bf7v9w0g5byhgyp89g3")))) | |
79 | (build-system gnu-build-system) | |
80 | (home-page "http://www.nongnu.org/confuse/") | |
81 | (synopsis "Configuration file parser library") | |
82 | (description "libconfuse is a configuration file parser library. It | |
83 | supports sections and (lists of) values (strings, integers, floats, booleans | |
84 | or other sections), as well as some other features (such as | |
85 | single/double-quoted strings, environment variable expansion, functions and | |
86 | nested include statements).") | |
0ede252b | 87 | (license license:isc))) |
5c37126f | 88 | |
1268e52d | 89 | (define-public bspwm |
90 | (package | |
91 | (name "bspwm") | |
92 | (version "0.9") | |
93 | (source | |
94 | (origin | |
95 | (file-name (string-append name "-" version ".tar.gz")) | |
96 | (method url-fetch) | |
97 | (uri (string-append | |
98 | "https://github.com/baskerville/bspwm/archive/" | |
99 | version ".tar.gz")) | |
100 | (sha256 | |
101 | (base32 | |
102 | "1pig0h2jk8wipyz90j69c4bk37bfyq60asnn0v0bqld2p2vjvyqy")))) | |
103 | (build-system gnu-build-system) | |
104 | (inputs | |
105 | `(("libxcb" ,libxcb) | |
106 | ("libxinerama" ,libxinerama) | |
107 | ("sxhkd" ,sxhkd) | |
108 | ("xcb-util" ,xcb-util) | |
109 | ("xcb-util-keysyms" ,xcb-util-keysyms) | |
110 | ("xcb-util-wm" ,xcb-util-wm))) | |
111 | (arguments | |
112 | '(#:phases (alist-delete 'configure %standard-phases) | |
113 | #:tests? #f ; no check target | |
114 | #:make-flags (list "CC=gcc" | |
115 | (string-append "PREFIX=" %output)))) | |
116 | (home-page "https://github.com/baskerville/bspwm") | |
117 | (synopsis "Tiling window manager based on binary space partitioning") | |
118 | (description "bspwm is a tiling window manager that represents windows as | |
119 | the leaves of a full binary tree.") | |
0ede252b | 120 | (license license:bsd-2))) |
1268e52d | 121 | |
63b1bdbc ED |
122 | (define-public i3status |
123 | (package | |
124 | (name "i3status") | |
766a22fb | 125 | (version "2.10") |
63b1bdbc ED |
126 | (source (origin |
127 | (method url-fetch) | |
fdad1f3c | 128 | (uri (string-append "https://i3wm.org/i3status/i3status-" |
63b1bdbc ED |
129 | version ".tar.bz2")) |
130 | (sha256 | |
131 | (base32 | |
766a22fb | 132 | "1497dsvb32z9xljmxz95dnyvsbayn188ilm3l4ys8m5h25vd1xfs")))) |
63b1bdbc ED |
133 | (build-system gnu-build-system) |
134 | (arguments | |
135 | `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)) | |
136 | #:phases | |
137 | (modify-phases %standard-phases | |
138 | (delete 'configure)) | |
139 | #:tests? #f)) ; no test suite | |
140 | (inputs | |
141 | `(("openlibm" ,openlibm) | |
142 | ("libconfuse" ,libconfuse) | |
143 | ("libyajl" ,libyajl) | |
144 | ("alsa-lib" ,alsa-lib) | |
766a22fb AM |
145 | ("pulseaudio" ,pulseaudio) |
146 | ("libnl" ,libnl) | |
63b1bdbc ED |
147 | ("libcap" ,libcap) |
148 | ("asciidoc" ,asciidoc))) | |
766a22fb AM |
149 | (native-inputs |
150 | `(("pkg-config" ,pkg-config))) | |
fdad1f3c | 151 | (home-page "https://i3wm.org/i3status/") |
63b1bdbc ED |
152 | (synopsis "Status bar for i3bar, dzen2, xmobar or similar programs") |
153 | (description "i3status is a small program for generating a status bar for | |
154 | i3bar, dzen2, xmobar or similar programs. It is designed to be very efficient | |
155 | by issuing a very small number of system calls, as one generally wants to | |
156 | update such a status line every second. This ensures that even under high | |
157 | load, your status bar is updated correctly. Also, it saves a bit of energy by | |
158 | not hogging your CPU as much as spawning the corresponding amount of shell | |
159 | commands would.") | |
0ede252b | 160 | (license license:bsd-3))) |
63b1bdbc | 161 | |
bda2ded6 ED |
162 | (define-public i3-wm |
163 | (package | |
164 | (name "i3-wm") | |
4bd391f5 | 165 | (version "4.13") |
bda2ded6 ED |
166 | (source (origin |
167 | (method url-fetch) | |
8658d403 | 168 | (uri (string-append "https://i3wm.org/downloads/i3-" |
bda2ded6 ED |
169 | version ".tar.bz2")) |
170 | (sha256 | |
171 | (base32 | |
4bd391f5 | 172 | "12ngz32swh9n85xy0cz1lq16aqi9ys5hq19v589q9a97wn1k3hcl")))) |
bda2ded6 ED |
173 | (build-system gnu-build-system) |
174 | (arguments | |
4bd391f5 LF |
175 | `(#:make-flags |
176 | (let* ((docbook-xsl-name-version ,(string-append | |
177 | (package-name docbook-xsl) "-" | |
178 | (package-version docbook-xsl))) | |
179 | (docbook-xsl-catalog-file (string-append | |
180 | (assoc-ref %build-inputs "docbook-xsl") | |
181 | "/xml/xsl/" | |
182 | docbook-xsl-name-version | |
183 | "/catalog.xml")) | |
184 | (docbook-xml-catalog-file (string-append | |
185 | (assoc-ref %build-inputs "docbook-xml") | |
186 | "/xml/dtd/docbook/catalog.xml"))) | |
187 | ;; Reference the catalog files required to build the manpages. | |
188 | (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " " | |
189 | docbook-xml-catalog-file) | |
190 | "CC=gcc" | |
191 | (string-append "PREFIX=" %output) | |
192 | ;; This works around the following error: | |
193 | ;; 'error: ‘for’ loop initial declarations are only allowed in C99 | |
194 | ;; or C11 mode' | |
195 | "CFLAGS=-std=c11")) | |
196 | ;; The build system tries to build in a separate directory, but that | |
197 | ;; seems to be unnecessary. | |
198 | #:configure-flags '("--disable-builddir") | |
199 | ;; The test suite appears to require the unpackaged Perl module AnyEvent. | |
200 | #:tests? #f)) | |
bda2ded6 ED |
201 | (inputs |
202 | `(("libxcb" ,libxcb) | |
203 | ("xcb-util" ,xcb-util) | |
204 | ("xcb-util-cursor" ,xcb-util-cursor) | |
205 | ("xcb-util-keysyms" ,xcb-util-keysyms) | |
206 | ("xcb-util-wm" ,xcb-util-wm) | |
4bd391f5 | 207 | ("xcb-util-xrm" ,xcb-util-xrm) |
bda2ded6 ED |
208 | ("libxkbcommon" ,libxkbcommon) |
209 | ("libev" ,libev) | |
210 | ("libyajl" ,libyajl) | |
211 | ("asciidoc" ,asciidoc) | |
212 | ("xmlto" ,xmlto) | |
213 | ("perl-pod-simple" ,perl-pod-simple) | |
214 | ("docbook-xml" ,docbook-xml) | |
215 | ("libx11" ,libx11) | |
216 | ("pcre" ,pcre) | |
217 | ("startup-notification" ,startup-notification) | |
218 | ("pango" ,pango) | |
219 | ("cairo" ,cairo))) | |
220 | (native-inputs | |
221 | `(("which" ,which) | |
222 | ("perl" ,perl) | |
4bd391f5 LF |
223 | ("pkg-config" ,pkg-config) |
224 | ;; For building the documentation. | |
225 | ("docbook-xsl" ,docbook-xsl))) | |
8658d403 | 226 | (home-page "https://i3wm.org/") |
bda2ded6 | 227 | (synopsis "Improved tiling window manager") |
a124bbd2 | 228 | (description "A tiling window manager, completely written |
bda2ded6 ED |
229 | from scratch. i3 is primarily targeted at advanced users and |
230 | developers.") | |
0ede252b | 231 | (license license:bsd-3))) |
6e38c4be | 232 | |
c165591d IVB |
233 | (define-public python-i3-py |
234 | (package | |
235 | (name "python-i3-py") | |
236 | (version "0.6.5") | |
237 | (source | |
238 | (origin | |
239 | ;; The latest release is not tagged in Git nor has an entry in PyPi, | |
240 | ;; but there is still a clear commit for it, and it's been the last one | |
241 | ;; for years. | |
242 | (method git-fetch) | |
243 | (uri (git-reference | |
244 | (url "https://github.com/ziberna/i3-py.git") | |
245 | (commit "27f88a616e9ecc340e7d041d3d00782f8a1964c1"))) | |
246 | (sha256 | |
247 | (base32 | |
248 | "1nm719dc2xqlll7vj4c4m7mpjb27lpn3bg3c66gajvnrz2x1nmxs")) | |
249 | (file-name (string-append name "-" version "-checkout")))) | |
250 | (build-system python-build-system) | |
251 | (arguments | |
252 | `(#:tests? #f ; no tests yet | |
253 | #:phases (modify-phases %standard-phases | |
254 | (add-after 'install 'install-doc | |
255 | ;; Copy readme file to documentation directory. | |
256 | (lambda* (#:key outputs #:allow-other-keys) | |
257 | (let ((doc (string-append (assoc-ref outputs "out") | |
258 | "/share/doc/" ,name))) | |
259 | (install-file "README.md" doc) | |
260 | ;; Avoid unspecified return value. | |
261 | #t)))))) | |
262 | (propagated-inputs | |
263 | `(("i3-wm" ,i3-wm))) | |
264 | (home-page "https://github.com/ziberna/i3-py") | |
265 | (synopsis "Python interface to the i3 window manager") | |
266 | (description "This package allows you to interact from a Python program | |
267 | with the i3 window manager via its IPC socket. It can send commands and other | |
268 | kinds of messages to i3, select the affected containers, filter results and | |
269 | subscribe to events.") | |
270 | (license license:gpl3+))) | |
271 | ||
272 | (define-public python2-i3-py | |
273 | (package-with-python2 python-i3-py)) | |
274 | ||
37356e0b IVB |
275 | (define-public quickswitch-i3 |
276 | (let ((commit "ed692b1e8f43b95bd907ced26238ce8ccb2ed28f") | |
277 | (revision "1")) ; Guix package revision | |
278 | (package | |
279 | (name "quickswitch-i3") | |
280 | (version (string-append "2.2-" revision "." | |
281 | (string-take commit 7))) | |
282 | (source | |
283 | (origin | |
284 | ;; The latest commit is a few years old and just a couple commits | |
285 | ;; after the last tagged release, so we use that latest commit | |
286 | ;; instead of the release. | |
287 | (method git-fetch) | |
288 | (uri (git-reference | |
289 | (url "https://github.com/proxypoke/quickswitch-for-i3.git") | |
290 | (commit commit))) | |
291 | (sha256 | |
292 | (base32 | |
293 | "0447077sama80jcdg5p64zjsvafmz5rbdrirhm1adcdjhkh6iqc5")) | |
294 | (patches (search-patches "quickswitch-fix-dmenu-check.patch")) | |
295 | (file-name (string-append name "-" version "-checkout")))) | |
296 | (build-system python-build-system) | |
297 | (arguments | |
298 | `(#:tests? #f ; no tests yet | |
299 | #:phases (modify-phases %standard-phases | |
300 | (add-after 'install 'install-doc | |
301 | ;; Copy readme file to documentation directory. | |
302 | (lambda* (#:key outputs #:allow-other-keys) | |
303 | (let ((doc (string-append (assoc-ref outputs "out") | |
304 | "/share/doc/" ,name))) | |
305 | (install-file "README.rst" doc) | |
306 | ;; Avoid unspecified return value. | |
307 | #t)))))) | |
308 | (inputs | |
309 | `(("python-i3-py" ,python-i3-py) | |
310 | ("dmenu" ,dmenu))) | |
311 | (home-page "https://github.com/proxypoke/quickswitch-for-i3") | |
312 | (synopsis "Quickly change to and locate windows in the i3 window manager") | |
313 | (description | |
314 | "This utility for the i3 window manager allows you to quickly switch to | |
315 | and locate windows on all your workspaces, using an interactive dmenu | |
316 | prompt.") | |
317 | (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))) | |
318 | ||
6e38c4be SB |
319 | (define-public xmonad |
320 | (package | |
321 | (name "xmonad") | |
322 | (version "0.11.1") | |
323 | (synopsis "Tiling window manager") | |
324 | (source (origin | |
325 | (method url-fetch) | |
966a543b | 326 | (uri (string-append "mirror://hackage/package/xmonad/" |
ca80b8ba | 327 | name "-" version ".tar.gz")) |
6e38c4be SB |
328 | (sha256 |
329 | (base32 | |
ca80b8ba PW |
330 | "1pfjssamiwpwjp1qqkm9m9p9s35pv381m0cwg6jxg0ppglibzq1r")) |
331 | (modules '((guix build utils))) | |
332 | (snippet | |
333 | ;; Here we update the constraints on the utf8-string package in | |
334 | ;; the Cabal file. We allow a newer version which is compatible | |
335 | ;; with GHC 7.10.2. The same change is applied on Hackage. See | |
336 | ;; <https://hackage.haskell.org/package/xmonad-0.11.1/revisions/>. | |
337 | '(substitute* "xmonad.cabal" | |
338 | (("utf8-string >= 0.3 && < 0.4") | |
339 | "utf8-string >= 0.3 && < 1.1"))))) | |
6e38c4be SB |
340 | (build-system haskell-build-system) |
341 | (inputs | |
342 | `(("ghc-mtl" ,ghc-mtl) | |
343 | ("ghc-utf8-string" ,ghc-utf8-string) | |
344 | ("ghc-extensible-exceptions" ,ghc-extensible-exceptions) | |
345 | ("ghc-x11" ,ghc-x11))) | |
346 | (arguments | |
347 | `(#:phases | |
348 | (modify-phases %standard-phases | |
349 | (add-after | |
350 | 'install 'install-xsession | |
351 | (lambda _ | |
352 | (let* ((xsessions (string-append %output "/share/xsessions"))) | |
353 | (mkdir-p xsessions) | |
354 | (call-with-output-file | |
355 | (string-append xsessions "/xmonad.desktop") | |
356 | (lambda (port) | |
357 | (format port "~ | |
358 | [Desktop Entry]~@ | |
359 | Name=~a~@ | |
360 | Comment=~a~@ | |
361 | Exec=~a/bin/xmonad~@ | |
362 | Type=Application~%" ,name ,synopsis %output))))))))) | |
363 | (home-page "http://xmonad.org") | |
364 | (description | |
365 | "Xmonad is a tiling window manager for X. Windows are arranged | |
366 | automatically to tile the screen without gaps or overlap, maximising screen | |
367 | use. All features of the window manager are accessible from the keyboard: a | |
368 | mouse is strictly optional. Xmonad is written and extensible in Haskell. | |
369 | Custom layout algorithms, and other extensions, may be written by the user in | |
370 | config files. Layouts are applied dynamically, and different layouts may be | |
371 | used on each workspace. Xinerama is fully supported, allowing windows to be | |
372 | tiled on several screens.") | |
0ede252b | 373 | (license license:bsd-3))) |
78edf44c SB |
374 | |
375 | (define-public ghc-xmonad-contrib | |
376 | (package | |
377 | (name "ghc-xmonad-contrib") | |
2687f7db | 378 | (version "0.11.4") |
78edf44c SB |
379 | (source |
380 | (origin | |
381 | (method url-fetch) | |
966a543b | 382 | (uri (string-append "mirror://hackage/package/xmonad-contrib/" |
78edf44c SB |
383 | "xmonad-contrib-" version ".tar.gz")) |
384 | (sha256 | |
385 | (base32 | |
2687f7db | 386 | "1g5cw9vvnfbiyi599fngk02zlmdhrf82x0bndhypkn6kybab6yd3")))) |
78edf44c SB |
387 | (build-system haskell-build-system) |
388 | (propagated-inputs | |
389 | `(("ghc-mtl" ,ghc-mtl) | |
2687f7db | 390 | ("ghc-old-time" ,ghc-old-time) |
78edf44c SB |
391 | ("ghc-random" ,ghc-random) |
392 | ("ghc-utf8-string" ,ghc-utf8-string) | |
393 | ("ghc-extensible-exceptions" ,ghc-extensible-exceptions) | |
394 | ("ghc-x11" ,ghc-x11) | |
395 | ("ghc-x11-xft" ,ghc-x11-xft) | |
396 | ("xmonad" ,xmonad))) | |
397 | (home-page "http://xmonad.org") | |
398 | (synopsis "Third party extensions for xmonad") | |
399 | (description | |
400 | "Third party tiling algorithms, configurations, and scripts to Xmonad, a | |
401 | tiling window manager for X.") | |
0ede252b | 402 | (license license:bsd-3))) |
45e10968 EB |
403 | |
404 | (define-public evilwm | |
405 | (package | |
406 | (name "evilwm") | |
407 | (version "1.1.1") | |
408 | (source | |
409 | (origin | |
410 | (method url-fetch) | |
411 | (uri (string-append "http://www.6809.org.uk/evilwm/evilwm-" | |
412 | version ".tar.gz")) | |
413 | (sha256 | |
414 | (base32 | |
c595cd47 | 415 | "0ak0yajzk3v4dg5wmaghv6acf7v02a4iw8qxmq5yw5ard8lrqn3r")) |
fc1adab1 | 416 | (patches (search-patches "evilwm-lost-focus-bug.patch")))) |
45e10968 EB |
417 | (build-system gnu-build-system) |
418 | (inputs | |
419 | `(("libx11" ,libx11) | |
420 | ("libxext" ,libxext) | |
421 | ("libxrandr" ,libxrandr))) | |
422 | (arguments | |
423 | `(#:modules ((srfi srfi-26) | |
424 | (guix build utils) | |
425 | (guix build gnu-build-system)) | |
426 | #:make-flags (let ((inputs (map (cut assoc-ref %build-inputs <>) | |
427 | '("libx11" "libxext" "libxrandr"))) | |
428 | (join (lambda (proc strs) | |
429 | (string-join (map proc strs) " "))) | |
430 | (dash-I (cut string-append "-I" <> "/include")) | |
431 | (dash-L (cut string-append "-L" <> "/lib"))) | |
432 | `("desktopfilesdir=$(prefix)/share/xsessions" | |
433 | ,(string-append "prefix=" (assoc-ref %outputs "out")) | |
434 | ,(string-append "CPPFLAGS=" (join dash-I inputs)) | |
435 | ,(string-append "LDFLAGS=" (join dash-L inputs)))) | |
436 | #:tests? #f ;no tests | |
437 | #:phases (modify-phases %standard-phases | |
438 | (delete 'configure)))) ;no configure script | |
439 | (home-page "http://www.6809.org.uk/evilwm/") | |
440 | (synopsis "Minimalist window manager for the X Window System") | |
441 | (description | |
442 | "evilwm is a minimalist window manager based on aewm, extended to feature | |
443 | many keyboard controls with repositioning and maximize toggles, solid window | |
444 | drags, snap-to-border support, and virtual desktops.") | |
0ede252b DM |
445 | (license (license:x11-style "file:///README")))) |
446 | ||
447 | (define-public fluxbox | |
448 | (package | |
449 | (name "fluxbox") | |
450 | (version "1.3.7") | |
451 | (synopsis "Small and fast window manager") | |
452 | (source (origin | |
453 | (method url-fetch) | |
de67e922 | 454 | (uri (string-append "mirror://sourceforge/fluxbox/fluxbox/" |
0ede252b DM |
455 | version "/fluxbox-" version ".tar.xz")) |
456 | (sha256 | |
457 | (base32 | |
458 | "1h1f70y40qd225dqx937vzb4k2cz219agm1zvnjxakn5jkz7b37w")))) | |
459 | (build-system gnu-build-system) | |
460 | (arguments | |
461 | `(#:make-flags '("CPPFLAGS=-U__TIME__") ;ugly, but for reproducibility | |
462 | #:phases | |
463 | (modify-phases %standard-phases | |
464 | (add-after | |
465 | 'install 'install-xsession | |
466 | (lambda _ | |
467 | (let ((xsessions (string-append %output "/share/xsessions"))) | |
468 | (mkdir-p xsessions) | |
469 | (call-with-output-file | |
470 | (string-append xsessions "/fluxbox.desktop") | |
471 | (lambda (port) | |
472 | (format port "~ | |
473 | [Desktop Entry]~@ | |
474 | Name=~a~@ | |
475 | Comment=~a~@ | |
476 | Exec=~a/bin/startfluxbox~@ | |
477 | Type=Application~%" ,name ,synopsis %output))))))))) | |
478 | (native-inputs | |
479 | `(("pkg-config" ,pkg-config))) | |
480 | (inputs | |
481 | `(("freetype" ,freetype) | |
482 | ("fribidi" ,fribidi) | |
483 | ("imlib2" ,imlib2) | |
484 | ("libx11" ,libx11) | |
485 | ("libxext" ,libxext) | |
486 | ("libxft" ,libxft) | |
487 | ("libxinerama" ,libxinerama) | |
488 | ("libxpm" ,libxpm) | |
489 | ("libxrandr" ,libxrandr) | |
490 | ("libxrender" ,libxrender))) | |
491 | (description "Fluxbox is a window manager. It is light on resources | |
492 | and easy to handle yet full of features to make an easy and fast desktop | |
493 | experience.") | |
494 | (home-page "http://fluxbox.org/") | |
495 | (license license:expat))) | |
3d1240aa CZ |
496 | |
497 | (define-public awesome | |
498 | (package | |
499 | (name "awesome") | |
22037a32 | 500 | (version "3.5.9") |
3d1240aa CZ |
501 | (source |
502 | (origin (method url-fetch) | |
503 | (uri (string-append | |
504 | "https://awesome.naquadah.org/download/awesome-" | |
505 | version ".tar.xz")) | |
506 | (sha256 | |
507 | (base32 | |
22037a32 | 508 | "0kynair1ykr74b39a4gcm2y24viial64337cf26nhlc7azjbby67")) |
3d1240aa CZ |
509 | (modules '((guix build utils) |
510 | (srfi srfi-19))) | |
3d1240aa CZ |
511 | (snippet |
512 | ;; Remove non-reproducible timestamp and use the date of the | |
513 | ;; source file instead. | |
514 | '(substitute* "common/version.c" | |
515 | (("__DATE__ \" \" __TIME__") | |
516 | (date->string | |
517 | (time-utc->date | |
518 | (make-time time-utc 0 | |
519 | (stat:mtime (stat "awesome.c")))) | |
520 | "\"~c\"")))) | |
521 | (patches (search-patches "awesome-reproducible-png.patch")))) | |
522 | (build-system cmake-build-system) | |
523 | (native-inputs `(("asciidoc" ,asciidoc) | |
524 | ("docbook-xsl" ,docbook-xsl) | |
525 | ("doxygen" ,doxygen) | |
526 | ("gperf" ,gperf) | |
527 | ("imagemagick" ,imagemagick) | |
528 | ("libxml2" ,libxml2) ;for XML_CATALOG_FILES | |
529 | ("pkg-config" ,pkg-config) | |
530 | ("xmlto" ,xmlto))) | |
531 | (inputs `(("cairo" ,cairo) | |
532 | ("dbus" ,dbus) | |
533 | ("gdk-pixbuf" ,gdk-pixbuf) | |
534 | ("glib" ,glib) | |
22037a32 | 535 | ("gobject-introspection" ,gobject-introspection) |
3d1240aa CZ |
536 | ("imlib2" ,imlib2) |
537 | ("libev" ,libev) | |
538 | ("libxcb" ,libxcb) | |
539 | ("libxcursor" ,libxcursor) | |
540 | ("libxdg-basedir" ,libxdg-basedir) | |
22037a32 | 541 | ("lua" ,lua) |
542 | ("lua-lgi",lua-lgi) | |
3d1240aa CZ |
543 | ("pango" ,pango) |
544 | ("startup-notification" ,startup-notification) | |
545 | ("xcb-util" ,xcb-util) | |
546 | ("xcb-util-cursor" ,xcb-util-cursor) | |
547 | ("xcb-util-image" ,xcb-util-image) | |
548 | ("xcb-util-keysyms" ,xcb-util-keysyms) | |
549 | ("xcb-util-renderutil" ,xcb-util-renderutil) | |
550 | ("xcb-util-wm" ,xcb-util-wm))) | |
551 | (arguments | |
552 | `(;; Let compression happen in our 'compress-documentation' phase so that | |
553 | ;; '--no-name' is used, which removes timestamps from gzip output. | |
554 | #:configure-flags '("-DCOMPRESS_MANPAGES=off") | |
555 | ||
22037a32 | 556 | #:phases |
557 | (modify-phases %standard-phases | |
558 | (add-before 'build 'xmlto-skip-validation | |
559 | (lambda _ | |
560 | ;; We can't download the necessary schema, so so skip | |
561 | ;; validation and assume they're valid. | |
562 | (substitute* "../build/CMakeFiles/man.dir/build.make" | |
563 | (("/xmlto") | |
564 | (string-append "/xmlto --skip-validation"))) | |
565 | #t)) | |
566 | (add-before 'configure 'set-lua-paths | |
567 | (lambda* (#:key inputs #:allow-other-keys) | |
568 | ;; The build process needs to load cairo dynamically. | |
569 | (let* ((cairo (string-append | |
570 | (assoc-ref inputs "cairo") "/lib" )) | |
571 | (lua-lgi (assoc-ref inputs "lua-lgi") )) | |
572 | (setenv "LD_LIBRARY_PATH" cairo ) | |
573 | (setenv "LUA_PATH" (string-append lua-lgi | |
574 | "/share/lua/5.2/?.lua")) | |
575 | (setenv "LUA_CPATH" (string-append lua-lgi | |
576 | "/lib/lua/5.2/?.so")) | |
577 | #t))) | |
578 | (replace 'check | |
579 | (lambda _ | |
580 | ;; There aren't any tests, so just make sure the binary | |
581 | ;; gets built and can be run successfully. | |
582 | (zero? (system* "../build/awesome" "-v")))) | |
583 | (add-after 'install 'wrap | |
584 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
585 | (let* ((awesome (assoc-ref outputs "out")) | |
586 | (cairo (string-append | |
587 | (assoc-ref inputs "cairo") "/lib" )) | |
588 | (lua-lgi (assoc-ref inputs "lua-lgi") )) | |
589 | (wrap-program (string-append awesome "/bin/awesome") | |
590 | `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))) | |
591 | `("LD_LIBRARY_PATH" suffix (, cairo)) | |
592 | `("LUA_PATH" suffix (,(string-append lua-lgi | |
593 | "/share/lua/5.2/?.lua"))) | |
594 | `("LUA_CPATH" suffix (,(string-append | |
595 | lua-lgi "/lib/lua/5.2/?.so")))))))))) | |
3d1240aa CZ |
596 | (synopsis "Highly configurable window manager") |
597 | (description | |
c4dd0def | 598 | "Awesome has been designed as a framework window manager. It is fast, small, |
599 | dynamic and extensible using the Lua programming language.") | |
3d1240aa CZ |
600 | (license license:gpl2+) |
601 | (home-page "https://awesome.naquadah.org/"))) |