[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49607] [PATCH v3 3/3] gnu: idris: Add doc output and build the html
From: |
Attila Lendvai |
Subject: |
[bug#49607] [PATCH v3 3/3] gnu: idris: Add doc output and build the html documentation. |
Date: |
Thu, 28 Apr 2022 15:28:04 +0200 |
* gnu/packages/idris.scm (make-idris-package): Build the html docs and install
it into the doc output.
---
gnu/packages/idris.scm | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index 1488996b6a..e03ca3bfbf 100644
--- a/gnu/packages/idris.scm
+++ b/gnu/packages/idris.scm
@@ -50,7 +50,9 @@ (define-module (gnu packages idris)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages node)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages python)
#:use-module (gnu packages racket)
+ #:use-module (gnu packages sphinx)
#:use-module (gnu packages version-control)
#:use-module (guix build-system gnu)
#:use-module (guix build-system haskell)
@@ -249,11 +251,17 @@ (define* (make-idris-package source idris-version
chez-scheme
bootstrap-idris)
coreutils which git
- node ; only for the tests
- racket ; only for the tests
- sed))
+ sed
+ ;; Only for the tests
+ node
+ racket
+ ;; Only for the docs
+ python-minimal
+ python-sphinx
+ python-sphinx-rtd-theme))
(inputs
(list bash-minimal chez-scheme gmp))
+ (outputs '("out" "doc"))
(arguments
(list
#:tests? tests?
@@ -276,6 +284,15 @@ (define* (make-idris-package source idris-version
(delete 'bootstrap)
(delete 'configure)
(delete 'check) ; check must happen after install and wrap-program
+ (add-before 'build 'build-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "make" "--directory" "docs/" "html")))
+ (add-after 'build-doc 'install-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((doc (assoc-ref outputs "doc")))
+ (copy-recursively "docs/build/html"
+ (string-append doc "/share/doc/"
+ ,name "-" ,version)))))
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((files-to-patch (filter file-exists?
--
2.35.1