guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#34576] Calibre: Add icon and desktop file to Calibre


From: Ricardo Wurmus
Subject: [bug#34576] Calibre: Add icon and desktop file to Calibre
Date: Tue, 19 Feb 2019 22:26:35 +0100
User-agent: mu4e 1.0; emacs 26.1

Hi pkill9,

> +         (add-after 'install 'install-icon
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out")))
> +               (install-file "imgsrc/calibre.svg"
> +                             (string-append out
> +                                            
> "/share/icons/hicolor/scalable/apps")))
> +             #t))

You can do without “let*” here.

> +         (add-after 'install-icon 'install-desktop-file
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out")))
> +               (mkdir-p (string-append out "/share/applications"))
> +               (with-output-to-file
> +                   (string-append out "/share/applications/calibre.desktop")
> +                 (lambda _
> +                   (format #t
> +                           "[Desktop Entry]~@
> +                Name=Calibre~@
> +                Comment=E-book organiser and reader~@
> +                Exec=~a/bin/calibre~@
> +                address@hidden/bin/calibre~@
> +                Icon=calibre~@
> +                Categories=Office~@
> +                Type=Application~%"
> +                           out)))
> +               #t)))

Does upstream not provide a desktop file?  I’d rather see this submitted
to upstream.  Have you contacted the developers about this?

Secondly, the indentation is odd.  I’d write it like this:

     (format #t "\
[Desktop Entry]~@
Name=…
Comment=…
…
Type=Application~%" out)


--
Ricardo






reply via email to

[Prev in Thread] Current Thread [Next in Thread]