[PATCH] gnu: windowmaker: Add '.desktop' file.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kei Kebreau
  • Ludovic Courtès
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 7 years ago
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20171203004653.30017-1-kkebreau@posteo.net
* gnu/packages/gnustep.scm (windowmaker)[arguments]: Add 'install-xsession'
phase.
---
gnu/packages/gnustep.scm | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)

Toggle diff (63 lines)
diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm
index 195249c43..9a2bfefb4 100644
--- a/gnu/packages/gnustep.scm
+++ b/gnu/packages/gnustep.scm
@@ -65,6 +65,7 @@ to easily create cross-compiled binaries.")
(package
(name "windowmaker")
(version "0.95.8")
+ (synopsis "NeXTSTEP-like window manager")
(source (origin
(method url-fetch)
(uri (string-append
@@ -75,7 +76,7 @@ to easily create cross-compiled binaries.")
"12p8kljqgx5hnic0zvs5mxwp7kg21sb6qjagb2qw8ydvf5amrgwx"))))
(build-system gnu-build-system)
(arguments
- '(#:phases
+ `(#:phases
(modify-phases %standard-phases
(add-before 'configure 'pre-configure
(lambda* (#:key outputs #:allow-other-keys)
@@ -97,14 +98,29 @@ to easily create cross-compiled binaries.")
(substitute* "src/defaults.c"
(("len = strlen\\(text\\) \\+ 40;")
(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~%" ,synopsis %output))))
+ #t))
+ (add-after 'install-xsession 'wrap
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
;; In turn, 'wmaker.inst' wants to invoke 'wmmenugen'
;; etc., so make sure everything is in $PATH.
(wrap-program (string-append bin "/wmaker.inst")
- `("PATH" ":" prefix (,bin)))))))))
+ `("PATH" ":" prefix (,bin)))))))))
(inputs
`(("libxmu" ,libxmu)
("libxft" ,libxft)
@@ -117,7 +133,6 @@ to easily create cross-compiled binaries.")
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://windowmaker.org/")
- (synopsis "NeXTSTEP-like window manager")
(description
"Window Maker is an X11 window manager originally designed to provide
integration support for the GNUstep Desktop Environment. In every way
--
2.15.0
Ludovic Courtès wrote 7 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 29543@debbugs.gnu.org)
87h8t5cps4.fsf@gnu.org
Kei Kebreau <kkebreau@posteo.net> skribis:

Toggle quote (3 lines)
> * gnu/packages/gnustep.scm (windowmaker)[arguments]: Add 'install-xsession'
> phase.

[...]

Toggle quote (10 lines)
> + (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~%" ,synopsis %output))))

We’ll have to make sure that ‘synopsis’ does not contain any newline
character or the ‘.desktop’ file would have invalid syntax, I suppose.

To be on the safe side perhaps we can do:

(string-map (match-lambda
(#\newline #\space)
(chr chr))
synopsis)

Apart from that it LGTM, thanks!

Ludo’.
Kei Kebreau wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29543@debbugs.gnu.org)
87d13rabbz.fsf@posteo.net
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (31 lines)
> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> * gnu/packages/gnustep.scm (windowmaker)[arguments]: Add 'install-xsession'
>> phase.
>
> [...]
>
>> + (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~%" ,synopsis %output))))
>
> We’ll have to make sure that ‘synopsis’ does not contain any newline
> character or the ‘.desktop’ file would have invalid syntax, I suppose.
>
> To be on the safe side perhaps we can do:
>
> (string-map (match-lambda
> (#\newline #\space)
> (chr chr))
> synopsis)
>
> Apart from that it LGTM, thanks!
>
> Ludo’.

Like I've attached?
From df79e8050b4385d92d6807a4d76cb1c7347d5906 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kkebreau@posteo.net>
Date: Sat, 2 Dec 2017 19:43:08 -0500
Subject: [PATCH] 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
---
gnu/packages/gnustep.scm | 33 ++++++++++++++++++++++++++++-----
1 file changed, 28 insertions(+), 5 deletions(-)

Toggle diff (80 lines)
diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm
index 195249c43..a6adc697a 100644
--- a/gnu/packages/gnustep.scm
+++ b/gnu/packages/gnustep.scm
@@ -34,7 +34,8 @@
#:use-module (gnu packages fontutils)
#:use-module (gnu packages image)
#: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
(package
@@ -65,6 +66,7 @@ to easily create cross-compiled binaries.")
(package
(name "windowmaker")
(version "0.95.8")
+ (synopsis "NeXTSTEP-like window manager")
(source (origin
(method url-fetch)
(uri (string-append
@@ -75,7 +77,10 @@ to easily create cross-compiled binaries.")
"12p8kljqgx5hnic0zvs5mxwp7kg21sb6qjagb2qw8ydvf5amrgwx"))))
(build-system gnu-build-system)
(arguments
- '(#:phases
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 match))
+ #:phases
(modify-phases %standard-phases
(add-before 'configure 'pre-configure
(lambda* (#:key outputs #:allow-other-keys)
@@ -97,14 +102,33 @@ to easily create cross-compiled binaries.")
(substitute* "src/defaults.c"
(("len = strlen\\(text\\) \\+ 40;")
(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)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
;; In turn, 'wmaker.inst' wants to invoke 'wmmenugen'
;; etc., so make sure everything is in $PATH.
(wrap-program (string-append bin "/wmaker.inst")
- `("PATH" ":" prefix (,bin)))))))))
+ `("PATH" ":" prefix (,bin)))))))))
(inputs
`(("libxmu" ,libxmu)
("libxft" ,libxft)
@@ -117,7 +141,6 @@ to easily create cross-compiled binaries.")
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://windowmaker.org/")
- (synopsis "NeXTSTEP-like window manager")
(description
"Window Maker is an X11 window manager originally designed to provide
integration support for the GNUstep Desktop Environment. In every way
--
2.15.0
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlooSSAACgkQ5qXuPBlG
eg0C2g//Vpkb4ZLwXLQWpugXPglAeHlbVuOzscYcpZSiq1HDbRzKCt//Nb266rv/
6TBS9zJiAmt1odj+kl+Ccbz+0oFPYo0CGRpi8rTEeP4ETs8IXJXUGAq8gHDoH2E+
Zfs2+VNpAkA8pyGhI+JUZL61z+ZoUkm4zokUsDmL/CwXP3kKveB4TB2faWxSwFPi
uo6pjgVQOrTYdTYXXuBmuSTiNI2+PNgRF7MF8gYJ4c4opw1mkeEomMzi7nE+CyDF
XqVDo2N7152G95dTYieTg4n0R6Y+tD5R8HKw3BNizekXRL7CitUKwN9LjxIKNDyx
ScUkHLMKYcQ4R10WV9fsFPEvnCzkmBQ0AVE/lMUB+bTibqw7kPaN7R1zIciTVW6B
xWtaD7hAFAK9xXGcPBR6zNntdQ3Yxu/jL0nuQe1dJKVMOpBcAq1ezWR1hxCIx963
J6tLI6ZSXqNtOEyXPB2VrSOwSWPn/SyRw8jcfEtD20oNUtzwreM0mh1PtHHL9rOV
r4f4UOGdXLg2P84AjAfrm5Ta4XyZt0l+p+AIXjedegLaU0G2GxQ6IPx3q3z9ZP4E
G9WTiRuNR2w+u4Mx/JKjaP6DSXdbz3SMazcXtAjM5uWBODATJRbdGd9BVFZN0giz
YgKorm0TxZn9pBuHQZZWqwFb6F7spthf3gwGkWXKOWjYnroAvU0=
=uWZk
-----END PGP SIGNATURE-----

Ludovic Courtès wrote 7 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 29543@debbugs.gnu.org)
87efo78stl.fsf@gnu.org
Kei Kebreau <kkebreau@posteo.net> skribis:

Toggle quote (10 lines)
> Like I've attached?
>
> From df79e8050b4385d92d6807a4d76cb1c7347d5906 Mon Sep 17 00:00:00 2001
> From: Kei Kebreau <kkebreau@posteo.net>
> Date: Sat, 2 Dec 2017 19:43:08 -0500
> Subject: [PATCH] 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

(Message cut too early?)

All right!

Ludo’.
Kei Kebreau wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29543-done@debbugs.gnu.org)
878tefa606.fsf@posteo.net
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (15 lines)
> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> Like I've attached?
>>
>> From df79e8050b4385d92d6807a4d76cb1c7347d5906 Mon Sep 17 00:00:00 2001
>> From: Kei Kebreau <kkebreau@posteo.net>
>> Date: Sat, 2 Dec 2017 19:43:08 -0500
>> Subject: [PATCH] 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
>
> (Message cut too early?)
>

Yes, I meant to put #:modules, but I forgot that 'git commit' ignores lines
beginning with a hash symbol by default.

Toggle quote (4 lines)
> All right!
>
> Ludo’.

Thanks for the review!
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlooZBkACgkQ5qXuPBlG
eg04TQ/+JB9O8ScJ+QCCh1iScpnZ1ffFjwBI6G29wdhXCXdoX82jvyTIxiKveEip
Lr06vRZrEN2TKO+yBCDuCHVGmItzRaVf/ZiUQsU91p6VI3VnW2KAiwbxwZooAZvh
MOl+hlCaPvC2B3NaU8iqyDE58TmA2ZxG5Z5DpxNWX0UHWmhrJ+NT3Ix+Se3ms6fY
oOcPPXuJJboEjvaT2afRfsw8pLsrwspjjHvbfkoKebp2Yn3dSAJrHlt11bkkxyQU
+/ACn3nRJ6+gt24K9HKuWf3Dv169B0eL+YiBa9wfmKFEZwoy/uUEQkZ2xq3MEypu
7bzvNk9IuhgLUWehM43uEB51D7WaRyDP5A7J29AsJGwYk3W7JEvjpAe8lkEisWzS
HdD4i9FwVkgupJO8nskCjDnJeSUdnxROEKY+G9HufEU6gmFR2WNzkEdjcu4xRZ2n
dAxhIqZF7IYfxeCq2V4C6n1pgxPT3jEqCAETwEl/WOmH0WV2/Cge/Sld9Xb1olgF
lrrNm8SQnU3rT2BXh953oHGBoseixvI+gRd4bEE/dH1yWJTYGMFJDq6D5FlAG1I3
KntsOO5THwpSbp9xR2lDk4kRYZsbDIA+Qt06c1aikmeGijdb/7LAT1rztLHn+w63
/jxK2fE6ASkegRzfQTpOyQVuCKA/chyJd1mj/EpjxGmkMsIAAGY=
=fsWO
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 29543@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 29543
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help