mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-12-23 15:24:52 +01:00
nongnu: make-google-chrome: Install icons.
* nongnu/packages/chrome.scm (make-google-chrome)[phases]: New phase 'install-icons. Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
This commit is contained in:
parent
701aca30cf
commit
006382573d
1 changed files with 17 additions and 2 deletions
|
@ -92,8 +92,23 @@
|
||||||
((old-exe) exe))
|
((old-exe) exe))
|
||||||
(substitute* (string-append usr/share "/menu/google-" #$appname ".menu")
|
(substitute* (string-append usr/share "/menu/google-" #$appname ".menu")
|
||||||
(("/opt") share)
|
(("/opt") share)
|
||||||
((old-exe) exe))
|
((old-exe) exe)))))
|
||||||
#t)))
|
(add-after 'install 'install-icons
|
||||||
|
(lambda _
|
||||||
|
(define (format-icon-size name)
|
||||||
|
(car
|
||||||
|
(string-split
|
||||||
|
(string-drop-right (string-drop name 13) 4)
|
||||||
|
#\_)))
|
||||||
|
(let ((icons (string-append #$output "/share/icons/hicolor"))
|
||||||
|
(share (string-append #$output "/share/google/" #$appname)))
|
||||||
|
(for-each (lambda (icon)
|
||||||
|
(let* ((icon-name (basename icon))
|
||||||
|
(icon-size (format-icon-size icon-name))
|
||||||
|
(target (string-append icons "/" icon-size "x" icon-size "/apps/google-" #$appname ".png")))
|
||||||
|
(mkdir-p (dirname target))
|
||||||
|
(rename-file icon target)))
|
||||||
|
(find-files share "product_logo_.*\\.png")))))
|
||||||
(add-before 'install-wrapper 'install-exe
|
(add-before 'install-wrapper 'install-exe
|
||||||
(lambda _
|
(lambda _
|
||||||
(let* ((bin (string-append #$output "/bin"))
|
(let* ((bin (string-append #$output "/bin"))
|
||||||
|
|
Loading…
Reference in a new issue