gnu: groff-minimal: Inherit phases from groff.

* gnu/packages/groff.scm (groff-minimal)[arguments]: Use
'substitute-keyword-arguments' to prevent phases from "groff" overriding the
phases in groff-minimal.
This commit is contained in:
Marius Bakke 2017-12-06 17:25:23 +01:00
parent 1ccd060f2f
commit 2ced84fbae
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -22,6 +22,7 @@
(define-module (gnu packages groff) (define-module (gnu packages groff)
#:use-module (guix licenses) #:use-module (guix licenses)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
@ -92,32 +93,32 @@ (define-public groff-minimal
#:configure-flags '("--docdir=/tmp/trash/doc") #:configure-flags '("--docdir=/tmp/trash/doc")
#:phases (modify-phases %standard-phases ,@(substitute-keyword-arguments (package-arguments groff)
(add-after 'install 'remove-non-essential-programs ((#:phases phases)
(lambda* (#:key outputs #:allow-other-keys) `(modify-phases ,phases
;; Keep only the programs that man-db needs at run time, (add-after 'install 'remove-non-essential-programs
;; and make sure we don't pull in Perl. (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) ;; Keep only the programs that man-db needs at run time,
(kept '("eqn" "neqn" "pic" "tbl" "refer" ;; and make sure we don't pull in Perl.
"nroff" "groff" "troff" "grotty"))) (let ((out (assoc-ref outputs "out"))
(for-each (lambda (file) (kept '("eqn" "neqn" "pic" "tbl" "refer"
(unless (member (basename file) kept) "nroff" "groff" "troff" "grotty")))
(delete-file file))) (for-each (lambda (file)
(find-files (string-append out "/bin"))) (unless (member (basename file) kept)
(delete-file file)))
(find-files (string-append out "/bin")))
;; Remove a bunch of unneeded Perl scripts. ;; Remove a bunch of unneeded Perl scripts.
(for-each delete-file (find-files out "\\.pl$")) (for-each delete-file (find-files out "\\.pl$"))
(for-each delete-file (for-each delete-file
(find-files out "BuildFoundries")) (find-files out "BuildFoundries"))
;; Remove ~3 MiB from share/groff/X.Y/font/devBACKEND ;; Remove ~3 MiB from share/groff/X.Y/font/devBACKEND
;; corresponding to the unused backends. ;; corresponding to the unused backends.
(for-each delete-file-recursively (for-each delete-file-recursively
(find-files out "^dev(dvi|ps|pdf|html|lj4)$" (find-files out "^dev(dvi|ps|pdf|html|lj4)$"
#:directories? #t)) #:directories? #t))
#t)))) #t))))))))))
,@(package-arguments groff)))))
;; There are no releases, so we take the latest commit. ;; There are no releases, so we take the latest commit.
(define-public roffit (define-public roffit