Subject: Re: [bug#29543] [PATCH] gnu: windowmaker: Add '.desktop' file.

From: [email-masked] (Ludovic Courtès)
Date: Tue, 05 Dec 2017 13:39:23 +0100

Kei Kebreau <[email-masked]> 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’.