gnu: papirus-icon-theme: Recursively resolve symlinks.

This follows up on commit aed385e18e.

* gnu/packages/gnome-xyz.scm (papirus-icon-theme)[arguments]: Replace
READLINK with CANONICALIZE-PATH to resolve symlink chains.
This commit is contained in:
Tobias Geerinckx-Rice 2023-01-29 01:00:00 +01:00
parent 630b6e62d2
commit 016eab3e29
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -227,11 +227,10 @@ (define-public papirus-icon-theme
(symlink? (lambda (_ stat) (symlink? (lambda (_ stat)
(eq? 'symlink (stat:type stat))))) (eq? 'symlink (stat:type stat)))))
(for-each (lambda (file) (for-each (lambda (file)
(with-directory-excursion (dirname file) (let ((target (canonicalize-path file)))
(let ((target (readlink 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 out symlink?))))))))
(native-inputs (native-inputs
(list `(,gtk+ "bin"))) (list `(,gtk+ "bin")))