all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <pkill9@runbox.com>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 34576 <34576@debbugs.gnu.org>
Subject: [bug#34576] Calibre: Add icon and desktop file to Calibre
Date: Wed, 20 Feb 2019 04:30:03 +0000 (GMT)	[thread overview]
Message-ID: <E1gwJWF-0002re-HA@rmmprod05.runbox> (raw)
In-Reply-To: <875ztfv59w.fsf@elephly.net>

Hi Ricardo,

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

It looks like it does provide a desktop file looking at this pull request: https://github.com/kovidgoyal/calibre/pull/739, which modifies this file (link to line showing desktop file): https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py#L1031

It's created using a Python script though, perhaps it doesn't get run during building?

I thought the developer wouldn't add it upstream because I remember investigating a long time ago and finding the developer writing somewhere that they wouldn't add a desktop file upstream and that it was the linux packager's job to do that, maybe I am mis-remembering or it was in some other context.

On Tue, 19 Feb 2019 22:26:35 +0100, Ricardo Wurmus <rekado@elephly.net> wrote:

> 
> 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~@
> > +                TryExec=~@*~a/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	other threads:[~2019-02-20  4:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 18:26 [bug#34576] Calibre: Add icon and desktop file to Calibre pkill9
2019-02-19 21:26 ` Ricardo Wurmus
2019-02-20  4:30   ` pkill9 [this message]
2019-02-20  5:00     ` Brett Gilio
2019-02-20  5:06   ` pkill9
2019-02-20 14:08     ` Tobias Geerinckx-Rice
2019-02-20 14:25     ` Tobias Geerinckx-Rice
2020-10-01  3:18 ` bug#34576: " Michael Rohleder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1gwJWF-0002re-HA@rmmprod05.runbox \
    --to=pkill9@runbox.com \
    --cc=34576@debbugs.gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.