all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: texlive-texmf-minimal: Prune in snippet.
@ 2016-11-29 11:32 Ricardo Wurmus
  2016-11-29 15:00 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2016-11-29 11:32 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/tex.scm (texlive-texmf-minimal)[arguments]: Move contents
of "prune" build phase...
[source]: ...to a snippet here.
---
 gnu/packages/tex.scm | 86 +++++++++++++++++++++++++---------------------------
 1 file changed, 41 insertions(+), 45 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7c84ed7..d7d5866 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -316,51 +316,47 @@ This package contains the complete TeX Live distribution.")
 ;; in particular dropping documentation and fonts.  It weighs in at 470 MiB
 ;; instead of 4 GiB.
 (define texlive-texmf-minimal
-  (package (inherit texlive-texmf)
-   (name "texlive-texmf-minimal")
-   (arguments
-    (substitute-keyword-arguments
-     (package-arguments texlive-texmf)
-     ((#:modules modules)
-      `((ice-9 ftw)
-        (srfi srfi-1)
-        ,@modules))
-     ((#:phases phases)
-      `(modify-phases ,phases
-         (add-after 'unpack 'prune
-           (lambda _
-             (define (delete subdir exclude)
-               "Delete all files and directories in SUBDIR except for those
-given in the list EXCLUDE."
-               (with-directory-excursion subdir
-                 (for-each delete-file-recursively
-                           (lset-difference equal?
-                                            (scandir ".")
-                                            (append '("." "..")
-                                                    exclude)))))
-             (with-directory-excursion "texmf-dist"
-               (for-each delete-file-recursively
-                         '("doc" "source" "tex4ht"))
-               ;; Delete all subdirectories of "fonts", except for "tfm" and
-               ;; any directories named "cm".
-               (delete "fonts" '("afm" "map" "pk" "source" "tfm" "type1"))
-               (delete "fonts/afm" '("public"))
-               (delete "fonts/afm/public" '("amsfonts"))
-               (delete "fonts/afm/public/amsfonts" '("cm"))
-               (delete "fonts/map" '("dvips"))
-               (delete "fonts/map/dvips" '("cm"))
-               (delete "fonts/source" '("public"))
-               (delete "fonts/source/public" '("cm"))
-               (delete "fonts/tfm" '("public"))
-               (delete "fonts/type1" '("public"))
-               (delete "fonts/type1/public" '("amsfonts"))
-               (delete "fonts/type1/public/amsfonts" '("cm")))
-             #t))))))
-   (description
-    "TeX Live provides a comprehensive TeX document production system.
-It includes all the major TeX-related programs, macro packages, and fonts
-that are free software, including support for many languages around the
-world.
+  (package
+    (inherit texlive-texmf)
+    (name "texlive-texmf-minimal")
+    (source
+     (origin (inherit (package-source texlive-texmf))
+             (modules '((guix build utils)
+                        (ice-9 ftw)
+                        (srfi srfi-1)))
+             (snippet
+              '(begin
+                 (define (delete subdir exclude)
+                   "Delete all files and directories in SUBDIR except for
+those given in the list EXCLUDE."
+                   (with-directory-excursion subdir
+                     (for-each delete-file-recursively
+                               (lset-difference equal?
+                                                (scandir ".")
+                                                (append '("." "..")
+                                                        exclude)))))
+                 (with-directory-excursion "texmf-dist"
+                   (for-each delete-file-recursively
+                             '("doc" "source" "tex4ht"))
+                   ;; Delete all subdirectories of "fonts", except for "tfm" and
+                   ;; any directories named "cm".
+                   (delete "fonts" '("afm" "map" "pk" "source" "tfm" "type1"))
+                   (delete "fonts/afm" '("public"))
+                   (delete "fonts/afm/public" '("amsfonts"))
+                   (delete "fonts/afm/public/amsfonts" '("cm"))
+                   (delete "fonts/map" '("dvips"))
+                   (delete "fonts/map/dvips" '("cm"))
+                   (delete "fonts/source" '("public"))
+                   (delete "fonts/source/public" '("cm"))
+                   (delete "fonts/tfm" '("public"))
+                   (delete "fonts/type1" '("public"))
+                   (delete "fonts/type1/public" '("amsfonts"))
+                   (delete "fonts/type1/public/amsfonts" '("cm")))
+                 #t))))
+    (description
+     "TeX Live provides a comprehensive TeX document production system.
+It includes all the major TeX-related programs, macro packages, and fonts that
+are free software, including support for many languages around the world.
 
 This package contains a small subset of the texmf-dist data.")))
 
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-01 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29 11:32 [PATCH] gnu: texlive-texmf-minimal: Prune in snippet Ricardo Wurmus
2016-11-29 15:00 ` Ludovic Courtès
2016-11-29 22:41   ` Ricardo Wurmus
2016-12-01 13:59     ` Ludovic Courtès
2016-12-01 15:04       ` Ricardo Wurmus

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.