summaryrefslogtreecommitdiff
path: root/gnu/packages/pdf.scm
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2023-04-30 20:53:54 +0200
committerLudovic Courtès <ludo@gnu.org>2023-05-06 00:01:56 +0200
commit64086a4fa449a9f6d2f835fcdf5498222b309e3a (patch)
treedd271f2ef94a87548b8b794fe3734e004d510ad7 /gnu/packages/pdf.scm
parentc106baed62b2242f4870392972f855207e1da545 (diff)
gnu: mupdf: Simplify snippet.
* gnu/packages/pdf.scm (mupdf)[source]: Simplify code to remove unused thirdparty libs. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/pdf.scm')
-rw-r--r--gnu/packages/pdf.scm23
1 files changed, 10 insertions, 13 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index f47c082770..ec4e4620f8 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -832,20 +832,17 @@ and based on PDF specification 1.7.")
"mupdf-" version "-source.tar.lz"))
(sha256
(base32 "0ghwam1c1izks1n2zq2pr8z67nvrx4njk5rla86b75l4pw58mmxy"))
- (modules '((guix build utils)))
+ (modules '((guix build utils)
+ (ice-9 ftw)
+ (srfi srfi-1)))
(snippet
- #~(begin
- ;; Remove bundled software. Keep patched variants.
- (let* ((keep (list "extract" "freeglut" "lcms2"))
- (from "thirdparty")
- (kept (string-append from "~temp")))
- (mkdir-p kept)
- (for-each (lambda (file)
- (rename-file (string-append from "/" file)
- (string-append kept "/" file)))
- keep)
- (delete-file-recursively from)
- (rename-file kept from))))))
+ ;; Remove bundled software. Keep patched variants.
+ #~(with-directory-excursion "thirdparty"
+ (let ((keep '("README" "extract" "freeglut" "lcms2")))
+ (for-each delete-file-recursively
+ (lset-difference string=?
+ (scandir ".")
+ (cons* "." ".." keep))))))))
(build-system gnu-build-system)
(inputs
(list curl