all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Timotej Lazar <timotej.lazar@araneo.si>
To: 63193@debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar@araneo.si>
Subject: [bug#63193] [PATCH 2/2] gnu: mupdf: Simplify snippet.
Date: Sun, 30 Apr 2023 20:53:54 +0200	[thread overview]
Message-ID: <20230430185354.4704-2-timotej.lazar@araneo.si> (raw)
In-Reply-To: <20230430185354.4704-1-timotej.lazar@araneo.si>

* gnu/packages/pdf.scm (mupdf)[source]: Simplify code to remove unused
thirdparty libs.
---
 gnu/packages/pdf.scm | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 6c44952583..1608c49127 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -804,20 +804,17 @@ (define-public mupdf
                            "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
-- 
2.39.2





  reply	other threads:[~2023-04-30 18:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30 18:51 [bug#63193] [PATCH 0/2] Update mupdf Timotej Lazar
2023-04-30 18:53 ` [bug#63193] [PATCH 1/2] gnu: mupdf: Update to 1.22.0 Timotej Lazar
2023-04-30 18:53   ` Timotej Lazar [this message]
2023-05-05 22:05 ` bug#63193: [PATCH 0/2] Update mupdf Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230430185354.4704-2-timotej.lazar@araneo.si \
    --to=timotej.lazar@araneo.si \
    --cc=63193@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.