From: Ricardo Wurmus <rekado@elephly.net>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: texlive-texmf-minimal: Prune in snippet.
Date: Tue, 29 Nov 2016 12:32:03 +0100 [thread overview]
Message-ID: <20161129113203.6922-1-rekado@elephly.net> (raw)
* 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
next reply other threads:[~2016-11-29 11:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 11:32 Ricardo Wurmus [this message]
2016-11-29 15:00 ` [PATCH] gnu: texlive-texmf-minimal: Prune in snippet 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
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161129113203.6922-1-rekado@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).