Message ID | 20200514114953.4457-1-jonathan.brielmaier@web.de |
---|---|
State | Accepted |
Headers | show |
Series | [bug#41256] gnu: icedove: Add a desktop file. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
This looks good to me!
so is this good for push? I cannot do that myself. On 14.05.20 14:50, Ricardo Wurmus via web wrote: > This looks good to me! > > > >
Jonathan Brielmaier <jonathan.brielmaier@web.de> writes: > Thunderbird upstream doesn't provide any desktop file. So we have > to create it downstream. I filed an upstream bug: > https://bugzilla.mozilla.org/show_bug.cgi?id=1637575 > > * gnu/packages/gnuzilla.scm (icedove)[phases]: Add install-desktop-file phase. Applied, thanks!
Hello, Marius Bakke <mbakke@fastmail.com> writes: > Jonathan Brielmaier <jonathan.brielmaier@web.de> writes: > >> Thunderbird upstream doesn't provide any desktop file. So we have >> to create it downstream. I filed an upstream bug: >> https://bugzilla.mozilla.org/show_bug.cgi?id=1637575 >> >> * gnu/packages/gnuzilla.scm (icedove)[phases]: Add >> install-desktop-file phase. I'm a bit late at the party, but would it make sense to use make-desktop-entry-file instead? Regards,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes: > Hello, > > Marius Bakke <mbakke@fastmail.com> writes: > >> Jonathan Brielmaier <jonathan.brielmaier@web.de> writes: >> >>> Thunderbird upstream doesn't provide any desktop file. So we have >>> to create it downstream. I filed an upstream bug: >>> https://bugzilla.mozilla.org/show_bug.cgi?id=1637575 >>> >>> * gnu/packages/gnuzilla.scm (icedove)[phases]: Add >>> install-desktop-file phase. > > I'm a bit late at the party, but would it make sense to use > make-desktop-entry-file instead? Probably, yes. :-)
On 23.05.20 21:56, Nicolas Goaziou wrote: >>> * gnu/packages/gnuzilla.scm (icedove)[phases]: Add >>> install-desktop-file phase. > > I'm a bit late at the party, but would it make sense to use > make-desktop-entry-file instead? Oh Nicolas that is a good catch. I didn't know this nice function :P But I wonder how to archive the compose action: ``` [Desktop Action ComposeMessage]~@ Name=Write new message~@ Exec=~@*~a/bin/icedove -compose~%" ``` With the field `actions` but how?
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 8a926681e0..7bf9850e97 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1344,6 +1344,32 @@ standards of the IceCat project.") (lambda _ (invoke "./mach" "build"))) (replace 'install (lambda _ (invoke "./mach" "install"))) + ;; Thunderbird doesn't provide any .desktop file. + ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1637575 + (add-after 'install 'install-desktop-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (apps (string-append out "/share/applications"))) + (mkdir-p apps) + (with-output-to-file (string-append apps "/icedove.desktop") + (lambda _ + (format #t + "[Desktop Entry]~@ + Name=Icedove~@ + Exec=~a/bin/icedove~@ + Icon=icedove~@ + GenericName=Mail/News Client~@ + Categories=Network;Email;~@ + Terminal=false~@ + StartupNotify=true~@ + MimeType=x-scheme-handler/mailto;~@ + Type=Application~@ + Actions=ComposeMessage;~@ + [Desktop Action ComposeMessage]~@ + Name=Write new message~@ + Exec=~@*~a/bin/icedove -compose~%" + out)))) + #t)) (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))