Skip to content
Snippets Groups Projects
Unverified Commit 537fe456 authored by Kei Kebreau's avatar Kei Kebreau
Browse files

gnu: windowmaker: Add '.desktop' file.

* gnu/packages/gnustep.scm (windowmaker)[arguments]: Add 'install-xsession'
phase. Add (guix build build-system), (guix build utils) and (ice-9 match) to
#:modules.
parent 65eaab63
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,8 @@ (define-module (gnu packages gnustep) ...@@ -34,7 +34,8 @@ (define-module (gnu packages gnustep)
#:use-module (gnu packages fontutils) #:use-module (gnu packages fontutils)
#:use-module (gnu packages image) #:use-module (gnu packages image)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages xml)) #:use-module (gnu packages xml)
#:use-module (ice-9 match))
(define-public gnustep-make (define-public gnustep-make
(package (package
...@@ -65,6 +66,7 @@ (define-public windowmaker ...@@ -65,6 +66,7 @@ (define-public windowmaker
(package (package
(name "windowmaker") (name "windowmaker")
(version "0.95.8") (version "0.95.8")
(synopsis "NeXTSTEP-like window manager")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
...@@ -75,7 +77,10 @@ (define-public windowmaker ...@@ -75,7 +77,10 @@ (define-public windowmaker
"12p8kljqgx5hnic0zvs5mxwp7kg21sb6qjagb2qw8ydvf5amrgwx")))) "12p8kljqgx5hnic0zvs5mxwp7kg21sb6qjagb2qw8ydvf5amrgwx"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases `(#:modules ((guix build gnu-build-system)
(guix build utils)
(ice-9 match))
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'configure 'pre-configure (add-before 'configure 'pre-configure
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
...@@ -97,14 +102,33 @@ (define-public windowmaker ...@@ -97,14 +102,33 @@ (define-public windowmaker
(substitute* "src/defaults.c" (substitute* "src/defaults.c"
(("len = strlen\\(text\\) \\+ 40;") (("len = strlen\\(text\\) \\+ 40;")
(string-append "len = strlen(text) + 107;")))))) (string-append "len = strlen(text) + 107;"))))))
(add-after 'install 'wrap (add-after 'install 'install-xsession
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(xsessions (string-append out "/share/xsessions")))
(mkdir-p xsessions)
(call-with-output-file
(string-append xsessions "/windowmaker.desktop")
(lambda (port)
(format port "~
[Desktop Entry]~@
Name=Window Maker~@
Comment=~a~@
Exec=~a/bin/wmaker~@
Type=Application~%"
(string-map (match-lambda
(#\newline #\space)
(chr chr))
,synopsis) %output))))
#t))
(add-after 'install-xsession 'wrap
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))) (bin (string-append out "/bin")))
;; In turn, 'wmaker.inst' wants to invoke 'wmmenugen' ;; In turn, 'wmaker.inst' wants to invoke 'wmmenugen'
;; etc., so make sure everything is in $PATH. ;; etc., so make sure everything is in $PATH.
(wrap-program (string-append bin "/wmaker.inst") (wrap-program (string-append bin "/wmaker.inst")
`("PATH" ":" prefix (,bin))))))))) `("PATH" ":" prefix (,bin)))))))))
(inputs (inputs
`(("libxmu" ,libxmu) `(("libxmu" ,libxmu)
("libxft" ,libxft) ("libxft" ,libxft)
...@@ -117,7 +141,6 @@ (define-public windowmaker ...@@ -117,7 +141,6 @@ (define-public windowmaker
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config))) `(("pkg-config" ,pkg-config)))
(home-page "http://windowmaker.org/") (home-page "http://windowmaker.org/")
(synopsis "NeXTSTEP-like window manager")
(description (description
"Window Maker is an X11 window manager originally designed to provide "Window Maker is an X11 window manager originally designed to provide
integration support for the GNUstep Desktop Environment. In every way integration support for the GNUstep Desktop Environment. In every way
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment