diff options
| author | Giacomo Leidi <goodoldpaul@autistici.org> | 2023-07-31 19:48:44 +0200 |
|---|---|---|
| committer | John Kehayias <john.kehayias@protonmail.com> | 2023-10-06 22:11:33 -0400 |
| commit | 006382573d26ca745fdd7421142d4215efeb5886 (patch) | |
| tree | 2587752c479b161f1fc3fe14adae2b3f3137f095 | |
| parent | 701aca30cf3c54af2afe35d7913a5b2b6f1c1ce6 (diff) | |
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>
| -rw-r--r-- | nongnu/packages/chrome.scm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/nongnu/packages/chrome.scm b/nongnu/packages/chrome.scm index 089345e..e343fc5 100644 --- a/nongnu/packages/chrome.scm +++ b/nongnu/packages/chrome.scm | |||
| @@ -92,8 +92,23 @@ | |||
| 92 | ((old-exe) exe)) | 92 | ((old-exe) exe)) |
| 93 | (substitute* (string-append usr/share "/menu/google-" #$appname ".menu") | 93 | (substitute* (string-append usr/share "/menu/google-" #$appname ".menu") |
| 94 | (("/opt") share) | 94 | (("/opt") share) |
| 95 | ((old-exe) exe)) | 95 | ((old-exe) exe))))) |
| 96 | #t))) | 96 | (add-after 'install 'install-icons |
| 97 | (lambda _ | ||
| 98 | (define (format-icon-size name) | ||
| 99 | (car | ||
| 100 | (string-split | ||
| 101 | (string-drop-right (string-drop name 13) 4) | ||
| 102 | #\_))) | ||
| 103 | (let ((icons (string-append #$output "/share/icons/hicolor")) | ||
| 104 | (share (string-append #$output "/share/google/" #$appname))) | ||
| 105 | (for-each (lambda (icon) | ||
| 106 | (let* ((icon-name (basename icon)) | ||
| 107 | (icon-size (format-icon-size icon-name)) | ||
| 108 | (target (string-append icons "/" icon-size "x" icon-size "/apps/google-" #$appname ".png"))) | ||
| 109 | (mkdir-p (dirname target)) | ||
| 110 | (rename-file icon target))) | ||
| 111 | (find-files share "product_logo_.*\\.png"))))) | ||
| 97 | (add-before 'install-wrapper 'install-exe | 112 | (add-before 'install-wrapper 'install-exe |
| 98 | (lambda _ | 113 | (lambda _ |
| 99 | (let* ((bin (string-append #$output "/bin")) | 114 | (let* ((bin (string-append #$output "/bin")) |
