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