utils: 'modify-phases' no longer introduces quotes.
[jackhill/guix/guix.git] / gnu / packages / key-mon.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
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 key-mon)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages python)
25 #:use-module (gnu packages gtk)
26 #:use-module (gnu packages gnome)
27 #:use-module (guix build-system python))
28
29 (define-public key-mon
30 (package
31 (name "key-mon")
32 (version "1.17")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append
36 "http://key-mon.googlecode.com/files/key-mon-"
37 version ".tar.gz"))
38 (sha256
39 (base32
40 "1liz0dxcqmchbnl1xhlxkqm3gh76wz9jxdxn9pa7dy77fnrjkl5q"))))
41 (build-system python-build-system)
42 (arguments
43 `(#:python ,python-2 ;uses the Python 2 'print' syntax
44 #:phases (modify-phases %standard-phases
45 (add-after 'install 'wrap
46 (lambda* (#:key inputs outputs #:allow-other-keys)
47 (let* ((out (assoc-ref outputs "out"))
48 (bin (string-append out "/bin"))
49 (rsvg (assoc-ref inputs "librsvg"))
50 (pixbuf (find-files
51 rsvg "^loaders\\.cache$")))
52 ;; Allow key-mon to load SVGs.
53 (wrap-program (string-append bin "/key-mon")
54 `("GDK_PIXBUF_MODULE_FILE" ":"
55 prefix ,pixbuf))))))
56 #:tests? #f)) ;no tests
57 (native-inputs
58 `(("python2-setuptools" ,python2-setuptools)))
59 (propagated-inputs
60 `(("python2-xlib" ,python2-xlib)
61 ("python2-pygtk" ,python2-pygtk)
62 ("librsvg" ,librsvg)
63 ("python2-rsvg" ,python2-rsvg)))
64 (home-page "http://code.google.com/p/key-mon")
65 (synopsis "Show keyboard and mouse status")
66 (description
67 "The key-mon utility displays the current keyboard and mouse status.
68 This is useful for teaching and screencasts.")
69 (license asl2.0)))