gnu: bitcoin-unlimited: Update to 1.9.2.0.
[jackhill/guix/guix.git] / gnu / packages / groff.scm
index 3a44497..fdb8440 100644 (file)
@@ -3,7 +3,7 @@
 ;;; 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>
@@ -128,8 +128,7 @@ is usually the formatter of \"man\" documentation pages.")
 (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"))
@@ -191,17 +190,21 @@ is usually the formatter of \"man\" documentation pages.")
       (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)))