;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
(define-public groff-minimal
;; Minimialist groff for use by man-db. Its closure size is less than half
;; that of the full-blown groff.
- (package
- (inherit groff)
+ (package/inherit groff
(name "groff-minimal")
(synopsis "Minimalist variant of Groff for use by man-db")
(outputs '("out"))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
- #:make-flags
- (list (string-append "INSTALLDIR="
- (assoc-ref %outputs "out") "/bin"))
#:phases
(modify-phases %standard-phases
(delete 'configure)
- (add-before 'install 'pre-install
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "roffit" (string-append out "/bin"))
+ (install-file "roffit.1" (string-append out "/share/man/man1"))
+ #t)))
+ (add-after 'install 'wrap-program
(lambda* (#:key outputs #:allow-other-keys)
- (mkdir-p (string-append (assoc-ref outputs "out")
- "/bin"))
- #t)))))
+ (let ((out (assoc-ref outputs "out")))
+ (wrap-program (string-append out "/bin/roffit")
+ `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))
+ #t))))))
(native-inputs `(("html-tree" ,perl-html-tree))) ; for test
(inputs
`(("perl" ,perl)))