ngz pushed a commit to branch tex-team in repository guix. commit b73cebbae4a008cb968adf835a302176db950bff Author: Nicolas Goaziou <m...@nicolasgoaziou.fr> AuthorDate: Sun May 12 12:32:35 2024 +0200
gnu: texlive-bin: Ignore "utils" directory. * gnu/packages/tex.scm (texlive-bin)[origin]<snippet>: Ignore "utils" executables. Change-Id: I79e61e6ce94b4e28681a499c7e34a76cebe68725 --- gnu/packages/tex.scm | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index dd2a92324b..e312f4b9e0 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -700,17 +700,24 @@ and should be preferred to it whenever a package would otherwise depend on (modules '((guix build utils) (ice-9 ftw))) (snippet - #~(with-directory-excursion "libs" - (let ((preserved-directories '("." ".." "lua53" "luajit" "pplib" "xpdf"))) - ;; Delete bundled software, except Lua which cannot easily be - ;; used as an external dependency, pplib and xpdf which aren't - ;; supported as system libraries (see m4/kpse-xpdf-flags.m4). - (for-each delete-file-recursively - (scandir "." - (lambda (file) - (and (not (member file preserved-directories)) - (eq? 'directory - (stat:type (stat file)))))))))))) + #~(let ((delete-other-directories + (lambda (root dirs) + (with-directory-excursion root + (for-each + delete-file-recursively + (scandir "." + (lambda (file) + (and (not (member file + (append '("." "..") dirs))) + (eq? 'directory + (stat:type (stat file))))))))))) + ;; Delete bundled software, except Lua which cannot easily be used + ;; as an external dependency, pplib and xpdf which aren't + ;; supported as system libraries (see m4/kpse-xpdf-flags.m4). + (delete-other-directories "libs" '("lua53" "luajit" "pplib" "xpdf")) + ;; Ignore all "utils": all of them are installed through their + ;; respective regular TeX Live package. + (delete-other-directories "utils" '()))))) (build-system gnu-build-system) (arguments (list