diff mbox

gnu: asciidoc: Use local docbook-xsl package.

Message ID 20160819190843.12364-1-sleep_walker@gnu.org
State New
Headers show

Commit Message

Tomáš Čech Aug. 19, 2016, 7:08 p.m. UTC
* gnu/packages/documentation.scm (asciidoc)[inputs]: Add docbook-xsl.
[arguments]: Add 'make-local-docbook-xsl' phase.
---
 gnu/packages/documentation.scm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

Comments

Leo Famulari Aug. 21, 2016, 9:44 p.m. UTC | #1
On Fri, Aug 19, 2016 at 09:08:43PM +0200, Tomáš Čech wrote:
> * gnu/packages/documentation.scm (asciidoc)[inputs]: Add docbook-xsl.
> [arguments]: Add 'make-local-docbook-xsl' phase.

Thanks! I added a comment above the phase and pushed as dd10ba6356.
And then I remembered that you could have pushed it yourself. Oops!
Tomáš Čech Aug. 22, 2016, 6:04 a.m. UTC | #2
On Sun, Aug 21, 2016 at 05:44:12PM -0400, Leo Famulari wrote:
>On Fri, Aug 19, 2016 at 09:08:43PM +0200, Tomáš Čech wrote:
>> * gnu/packages/documentation.scm (asciidoc)[inputs]: Add docbook-xsl.
>> [arguments]: Add 'make-local-docbook-xsl' phase.
>
>Thanks! I added a comment above the phase and pushed as dd10ba6356.

Thanks!

>And then I remembered that you could have pushed it yourself. Oops!

That doesn't matter :)

I think we can close bug#24145 now.

S_W
diff mbox

Patch

diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index 72af708..59417a0 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -49,8 +49,23 @@ 
                (base32
                 "1w71nk527lq504njmaf0vzr93pgahkgzzxzglrq6bay8cw2rvnvq"))))
     (build-system gnu-build-system)
-    (arguments '(#:tests? #f))                    ; no 'check' target
-    (inputs `(("python" ,python-2)))
+    (arguments
+     `(#:tests? #f                     ; no 'check' target
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'make-local-docbook-xsl
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (substitute* (find-files "docbook-xsl" ".*\\.xsl$")
+                         (("xsl:import href=\"http://docbook.sourceforge.net/\
+release/xsl/current")
+                          (string-append
+                           "xsl:import href=\""
+                           (string-append (assoc-ref inputs "docbook-xsl")
+                                          "/xml/xsl/docbook-xsl-"
+                                          ,(package-version docbook-xsl)))))
+                       #t)))))
+    (inputs `(("python" ,python-2)
+              ("docbook-xsl" ,docbook-xsl)))
     (home-page "http://www.methods.co.nz/asciidoc/")
     (synopsis "Text-based document generation system")
     (description