Commit | Line | Data |
---|---|---|
0af626ff | 1 | ;;; GNU Guix --- Functional package management for GNU |
c36b2228 | 2 | ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
0af626ff LC |
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 guile-wm) | |
20 | #:use-module (guix licenses) | |
21 | #:use-module (gnu packages) | |
22 | #:use-module (gnu packages xorg) | |
23 | #:use-module (gnu packages guile) | |
24 | #:use-module (gnu packages pkg-config) | |
25 | #:use-module (guix packages) | |
26 | #:use-module (guix download) | |
27 | #:use-module (guix build-system gnu)) | |
28 | ||
29 | (define-public guile-xcb | |
30 | (package | |
31 | (name "guile-xcb") | |
9037ea2c | 32 | (version "1.3") |
0af626ff LC |
33 | (source (origin |
34 | (method url-fetch) | |
35 | (uri (string-append "http://www.markwitmer.com/dist/guile-xcb-" | |
36 | version ".tar.gz")) | |
37 | (sha256 | |
38 | (base32 | |
9037ea2c | 39 | "04dvbqdrrs67490gn4gkq9zk8mqy3mkls2818ha4p0ckhh0pm149")))) |
0af626ff LC |
40 | (build-system gnu-build-system) |
41 | (arguments '(;; Parallel builds fail. | |
42 | #:parallel-build? #f | |
43 | ||
0af626ff | 44 | #:configure-flags (list (string-append |
9037ea2c | 45 | "--with-guile-site-dir=" |
0af626ff | 46 | (assoc-ref %outputs "out") |
9037ea2c LC |
47 | "/share/guile/site/2.0") |
48 | (string-append | |
49 | "--with-guile-site-ccache-dir=" | |
50 | (assoc-ref %outputs "out") | |
51 | "/share/guile/site/2.0")))) | |
0af626ff LC |
52 | (native-inputs `(("pkg-config" ,pkg-config))) |
53 | (inputs `(("guile" ,guile-2.0) | |
54 | ("xcb" ,xcb-proto))) | |
55 | (home-page "http://www.markwitmer.com/guile-xcb/guile-xcb.html") | |
56 | (synopsis "XCB bindings for Guile") | |
57 | (description | |
58 | "Guile-XCB implements the XCB protocol and provides all the tools | |
59 | necessary to write X client code in Guile Scheme without any external | |
60 | dependencies.") | |
61 | (license gpl3+))) | |
901eee2c LC |
62 | |
63 | (define-public guile-wm | |
64 | (package | |
65 | (name "guile-wm") | |
c36b2228 | 66 | (version "1.0") |
901eee2c LC |
67 | (source (origin |
68 | (method url-fetch) | |
69 | (uri (string-append "http://www.markwitmer.com/dist/guile-wm-" | |
70 | version ".tar.gz")) | |
71 | (sha256 | |
72 | (base32 | |
c36b2228 | 73 | "1l9qcz236jxvryndimjy62cf8zxf8i3f8vg3zpqqjhw15j9mdk3r")))) |
901eee2c LC |
74 | (build-system gnu-build-system) |
75 | (arguments '(;; The '.scm' files go to $(datadir), so set that to the | |
76 | ;; standard value. | |
77 | #:configure-flags (list (string-append "--datadir=" | |
78 | (assoc-ref %outputs "out") | |
79 | "/share/guile/site/2.0")) | |
80 | #:phases (alist-cons-before | |
81 | 'configure 'set-go-directory | |
82 | (lambda* (#:key outputs #:allow-other-keys) | |
83 | ;; Install .go files to $out/share/guile/site/2.0. | |
84 | (let ((out (assoc-ref outputs "out"))) | |
85 | (substitute* "module/Makefile.in" | |
86 | (("^wmdir = .*$") | |
87 | (string-append "wmdir = " out | |
88 | "/share/guile/site/2.0\n"))))) | |
89 | (alist-cons-after | |
90 | 'install 'set-load-path | |
91 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
92 | ;; Put Guile-XCB's and Guile-WM's modules in the | |
93 | ;; search path of PROG. | |
94 | (let* ((out (assoc-ref outputs "out")) | |
95 | (prog (string-append out "/bin/guile-wm")) | |
96 | (mods (string-append | |
97 | out "/share/guile/site/2.0")) | |
98 | (xcb (string-append | |
99 | (assoc-ref inputs "guile-xcb") | |
100 | "/share/guile/site/2.0"))) | |
101 | (wrap-program | |
102 | prog | |
103 | `("GUILE_LOAD_PATH" ":" prefix (,mods ,xcb)) | |
104 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix | |
105 | (,mods ,xcb))))) | |
106 | %standard-phases)))) | |
107 | (native-inputs `(("pkg-config" ,pkg-config))) | |
108 | (inputs `(("guile" ,guile-2.0) | |
109 | ("guile-xcb" ,guile-xcb))) | |
110 | (home-page "http://www.markwitmer.com/guile-xcb/guile-wm.html") | |
111 | (synopsis "X11 window manager toolkit in Scheme") | |
112 | (description | |
113 | "Guile-WM is a simple window manager that's completely customizable—you | |
114 | have total control of what it does by choosing which modules to include. | |
115 | Included with it are a few modules that provide basic TinyWM-like window | |
116 | management, some window record-keeping, multi-monitor support, and emacs-like | |
35b9e423 | 117 | keymaps and minibuffer. At this point, it's just enough to get you started.") |
901eee2c | 118 | (license gpl3+))) |