X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/18af6870370226b4d502d7372844e7f2aded5887..1c21468c7a7d09fbe065d1ceebf5f542537c877c:/gnu/packages/groff.scm diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 5fe353a901..0803a2a7f5 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -3,9 +3,11 @@ ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2017 Ludovic Courtès -;;; Copyright © 2019 Efraim Flashner +;;; Copyright © 2019, 2020 Efraim Flashner ;;; Copyright © 2019 Eric Bavier ;;; Copyright © 2019 Mathieu Othacehe +;;; Copyright © 2020 Michael Rohleder +;;; Copyright © 2020 Prafulla Giri ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,12 +31,15 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system ruby) #:use-module (gnu packages) + #:use-module (gnu packages ruby) #:use-module (gnu packages bison) #:use-module (gnu packages ghostscript) #:use-module (gnu packages netpbm) #:use-module (gnu packages perl) - #:use-module (gnu packages texinfo)) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages web)) (define-public groff (package @@ -169,34 +174,39 @@ is usually the formatter of \"man\" documentation pages.") ;; There are no releases, so we take the latest commit. (define-public roffit - (let ((commit "e5228388e3faf2b7f1ae5bd048ad46ed565304c6") + (let ((commit "b59e6c855ebea03daf76e996b5c0f8343f11be3d") (revision "1")) (package (name "roffit") - (version (string-append "0.11-" revision "." (string-take commit 9))) + (version (string-append "0.12-" revision "." (string-take commit 9))) (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/bagder/roffit.git") + (url "https://github.com/bagder/roffit") (commit commit))) (file-name (string-append "roffit-" commit "-checkout")) (sha256 (base32 - "1y7ndbqciy7h0khlpi1bv4v1614vhybnmm4jysj6fwxkw9cwv1nc")))) + "0z4cs92yqh22sykfgbjlyxfaifdvsd47cf1yhr0f2rgcc6l0fj1r")))) (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) - (mkdir-p (string-append (assoc-ref outputs "out") - "/bin")) - #t))))) + (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) + (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))) (home-page "https://daniel.haxx.se/projects/roffit/") @@ -205,3 +215,49 @@ is usually the formatter of \"man\" documentation pages.") "Roffit is a program that reads an nroff file and outputs an HTML file. It is typically used to display man pages on a web site.") (license expat)))) + +(define-public ronn-ng + (package + (name "ronn-ng") + (version "0.9.1") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "ronn-ng" version)) + (sha256 + (base32 + "1slxfg57cabmh98fw507z4ka6lwq1pvbrqwppflxw6700pi8ykfh")))) + (build-system ruby-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'extract-gemspec 'fix-gemspec-mustache + (lambda _ + (substitute* "ronn-ng.gemspec" + (("(.freeze.*~>).*(\".*$)" all start end) + (string-append start " 1.0" end))) + #t)) + (add-after 'wrap 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (let ((prog (string-append (assoc-ref %outputs "out") "/bin/ronn"))) + (wrap-program prog + `("PATH" ":" suffix ,(map + (lambda (exp_inpt) + (string-append + (assoc-ref %build-inputs exp_inpt) + "/bin")) + '("ruby-kramdown" + "ruby-mustache" + "ruby-nokogiri"))))) + #t))))) + (inputs + `(("ruby-kramdown" ,ruby-kramdown) + ("ruby-mustache" ,ruby-mustache) + ("ruby-nokogiri" ,ruby-nokogiri))) + (synopsis + "Build manuals in HTML and Unix man page format from Markdown") + (description + "Ronn-NG is an updated fork of ronn. It builds manuals in HTML and Unix +man page format from Markdown.") + (home-page "https://github.com/apjanke/ronn-ng") + (license expat)))