nongnu: firefox: Use absolute filename for symlink target of icons.

* nongnu/packages/mozilla.scm (firefox)[arguments]: In install-desktop-entry
phase, use absolute name file for symlink target of icons.

Revert e3c50e1385.

Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
Zhu Zihao 2020-10-03 13:46:43 +08:00 committed by Jonathan Brielmaier
parent 3783cf2b51
commit 2a954a4181
No known key found for this signature in database
GPG key ID: ECFC83988B4E4B9F

View file

@ -324,8 +324,7 @@
(applications (string-append out "/share/applications"))) (applications (string-append out "/share/applications")))
(substitute* desktop-file (substitute* desktop-file
(("^Exec=firefox") (string-append "Exec=" out "/bin/firefox")) (("^Exec=firefox") (string-append "Exec=" out "/bin/firefox"))
(("^Icon=.*") (string-append "Icon=" out (("Icon=.*") "Icon=firefox\n")
"/lib/firefox/browser/chrome/icons/default/default128.png\n"))
(("NewWindow") "new-window") (("NewWindow") "new-window")
(("NewPrivateWindow") "new-private-window")) (("NewPrivateWindow") "new-private-window"))
(install-file desktop-file applications)) (install-file desktop-file applications))
@ -336,16 +335,16 @@
(icon-source-dir (icon-source-dir
(string-append (string-append
out "/lib/firefox/browser/chrome/icons/default"))) out "/lib/firefox/browser/chrome/icons/default")))
(with-directory-excursion icon-source-dir (for-each
(for-each (lambda (size)
(lambda (size) (let ((dest (string-append out "/share/icons/hicolor/"
(let ((dest (string-append out "/share/icons/hicolor/" size "x" size "/apps")))
size "x" size "/apps"))) (mkdir-p dest)
(mkdir-p dest) (symlink (string-append icon-source-dir
(symlink (string-append "default" size ".png") "/default" size ".png")
(string-append dest "/firefox.png")))) (string-append dest "/firefox.png"))))
'("16" "32" "48" "64" "128")) '("16" "32" "48" "64" "128"))
#t))))) #t))))
;; Test will significantly increase build time but with little rewards. ;; Test will significantly increase build time but with little rewards.
#:tests? #f #:tests? #f