Danny Milosavljevic <[email protected]> skribis: > On Sat, 28 May 2016 17:22:41 +0200 > [email protected] (Ludovic Courtès) wrote: > >> I figured there’s already a desktop entry template in the source, and >> it’s more complete (it includes translations), hence this patch: > > I tried your patch and I get:
Oops, my bad. I tested the attached one. It works as expected, but there remain “%%ifdef” things in it (see attached file), and I’m guessing GNOME & co. will barf upon them, though I don’t know how to test. Thoughts? Thanks, Ludo’.
icecat.desktop
Description: Binary data
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 7e52534..264a754 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -509,7 +509,24 @@ standards.")
(format #t "configure flags: ~s~%" flags)
(zero? (apply system* bash
(string-append srcdir "/configure")
- flags))))))))
+ flags)))))
+ (add-before 'configure 'install-desktop-entry
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Install the '.desktop' file.
+ (let* ((out (assoc-ref outputs "out"))
+ (applications (string-append out "/share/applications")))
+ (mkdir-p applications)
+ (copy-file "debian/icecat.desktop.in"
+ "debian/icecat.desktop")
+ (substitute* "debian/icecat.desktop"
+ (("@MOZ_DISPLAY_NAME@")
+ "GNU IceCat")
+ (("^Exec=@MOZ_APP_NAME@")
+ (string-append "Exec=" out "/bin/icecat"))
+ (("@MOZ_APP_NAME@")
+ "icecat"))
+ (install-file "debian/icecat.desktop" applications)
+ #t))))))
(home-page "http://www.gnu.org/software/gnuzilla/")
(synopsis "Entirely free browser derived from Mozilla Firefox")
(description
