gnu: guile-wm: Add '.desktop' file.

* gnu/packages/guile-wm.scm (guile-wm)[arguments]: Add
'install-xsession' phase.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Alex ter Weele 2016-09-11 22:18:53 -04:00 committed by Ludovic Courtès
parent 66daf78c0a
commit 23de5cbd14
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Alex ter Weele <alex.ter.weele@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -64,6 +65,7 @@ (define-public guile-wm
(package (package
(name "guile-wm") (name "guile-wm")
(version "1.0") (version "1.0")
(synopsis "X11 window manager toolkit in Scheme")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://www.markwitmer.com/dist/guile-wm-" (uri (string-append "http://www.markwitmer.com/dist/guile-wm-"
@ -72,7 +74,8 @@ (define-public guile-wm
(base32 (base32
"1l9qcz236jxvryndimjy62cf8zxf8i3f8vg3zpqqjhw15j9mdk3r")))) "1l9qcz236jxvryndimjy62cf8zxf8i3f8vg3zpqqjhw15j9mdk3r"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments '(;; The '.scm' files go to $(datadir), so set that to the (arguments
`( ;; The '.scm' files go to $(datadir), so set that to the
;; standard value. ;; standard value.
#:configure-flags (list (string-append "--datadir=" #:configure-flags (list (string-append "--datadir="
(assoc-ref %outputs "out") (assoc-ref %outputs "out")
@ -103,12 +106,28 @@ (define-public guile-wm
`("GUILE_LOAD_PATH" ":" prefix (,mods ,xcb)) `("GUILE_LOAD_PATH" ":" prefix (,mods ,xcb))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix `("GUILE_LOAD_COMPILED_PATH" ":" prefix
(,mods ,xcb))))) (,mods ,xcb)))))
%standard-phases)))) (alist-cons-after
'install 'install-xsession
(lambda* (#:key outputs #:allow-other-keys)
;; add a .desktop file to xsessions
(let ((xsessions (string-append
%output "/share/xsessions")))
(mkdir-p xsessions)
(call-with-output-file (string-append
xsessions "/guile-wm.desktop")
(lambda (port)
(format port
"[Desktop Entry]~@
Name=~a~@
Comment=~a~@
Exec=~a/bin/guile-wm~@
Type=Application~%"
,name ,synopsis %output)))))
%standard-phases)))))
(native-inputs `(("pkg-config" ,pkg-config))) (native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("guile" ,guile-2.0) (inputs `(("guile" ,guile-2.0)
("guile-xcb" ,guile-xcb))) ("guile-xcb" ,guile-xcb)))
(home-page "http://www.markwitmer.com/guile-xcb/guile-wm.html") (home-page "http://www.markwitmer.com/guile-xcb/guile-wm.html")
(synopsis "X11 window manager toolkit in Scheme")
(description (description
"Guile-WM is a simple window manager that's completely customizableyou "Guile-WM is a simple window manager that's completely customizableyou
have total control of what it does by choosing which modules to include. have total control of what it does by choosing which modules to include.