guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

25/54: gnu: texlive-libkpathsea: Tiny refactoring.


From: guix-commits
Subject: 25/54: gnu: texlive-libkpathsea: Tiny refactoring.
Date: Tue, 14 May 2024 15:34:24 -0400 (EDT)

ngz pushed a commit to branch tex-team
in repository guix.

commit 3f258dadb3642a9c97c5e10d63f26dfedb7c8d01
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sat May 11 17:13:34 2024 +0200

    gnu: texlive-libkpathsea: Tiny refactoring.
    
    * gnu/packages/tex.scm (texlive-libkpathsea)[source]<snippet>: Refactor
    un-bundling.  Remove "utils" contents.
    
    Change-Id: Ib1d5a00ea6493bf1488a69e72470dfc7cf613e78
---
 gnu/packages/tex.scm | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index f044a867fa..06ca76016f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -184,22 +184,18 @@
        (modules '((guix build utils)
                   (ice-9 ftw)))
        (snippet
-        #~(begin
-            (with-directory-excursion "texk"
-              (let ((preserved-directories '("." ".." "kpathsea")))
-                (for-each
-                 delete-file-recursively
-                 (scandir "."
-                          (lambda (file)
-                            (and (not (member file preserved-directories))
-                                 (eq? 'directory (stat:type (stat file)))))))))
-            (with-directory-excursion "libs"
-              (for-each
-               delete-file-recursively
-               (scandir "."
-                        (lambda (file)
-                          (and (not (member file '("." "..")))
-                               (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-other-directories "libs" '())
+            (delete-other-directories "utils" '())
+            (delete-other-directories "texk" '("kpathsea"))))))
     (build-system gnu-build-system)
     (arguments
      (list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]