mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
gnu: papirus-icon-theme: Harden links before cache generation.
Output is identical. This just feels moar correct. * gnu/packages/gnome-xyz.scm (papirus-icon-theme)[arguments]: Run the 'halve-inode-consumption phase before the 'install one.
This commit is contained in:
parent
016eab3e29
commit
77aff2b5d2
1 changed files with 4 additions and 5 deletions
|
@ -217,21 +217,20 @@ (define-public papirus-icon-theme
|
||||||
(delete 'bootstrap)
|
(delete 'bootstrap)
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
(delete 'build)
|
(delete 'build)
|
||||||
(add-after 'install 'halve-inode-consumption
|
(add-before 'install 'halve-inode-consumption
|
||||||
;; This package uses over 100K inodes, which is a lot. We can easily
|
;; This package uses over 100K inodes, which is a lot. We can easily
|
||||||
;; halve that number by using (hard) links, to no ill effect.
|
;; halve that number by using (hard) links, to no ill effect.
|
||||||
;; See <https://logs.guix.gnu.org/guix/2023-01-31.log#171227>.
|
;; See <https://logs.guix.gnu.org/guix/2023-01-31.log#171227>.
|
||||||
;; However, the source checkout will still use the full amount!
|
;; However, the source checkout will still use the full amount!
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((symlink? (lambda (_ stat)
|
||||||
(symlink? (lambda (_ stat)
|
|
||||||
(eq? 'symlink (stat:type stat)))))
|
(eq? 'symlink (stat:type stat)))))
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (file)
|
||||||
(let ((target (canonicalize-path file)))
|
(let ((target (canonicalize-path file)))
|
||||||
(when (eq? 'regular (stat:type (stat target)))
|
(when (eq? 'regular (stat:type (stat target)))
|
||||||
(delete-file file)
|
(delete-file file)
|
||||||
(link target file))))
|
(link target file))))
|
||||||
(find-files out symlink?))))))))
|
(find-files "." symlink?))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list `(,gtk+ "bin")))
|
(list `(,gtk+ "bin")))
|
||||||
(home-page "https://git.io/papirus-icon-theme")
|
(home-page "https://git.io/papirus-icon-theme")
|
||||||
|
|
Loading…
Reference in a new issue