From: ludo@gnu.org (Ludovic Courtès)
To: John Darrington <jmd@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add tinyproxy.
Date: Thu, 12 Jun 2014 13:59:02 +0200 [thread overview]
Message-ID: <87d2eeibjt.fsf@gnu.org> (raw)
In-Reply-To: <1402571185-31488-1-git-send-email-jmd@gnu.org> (John Darrington's message of "Thu, 12 Jun 2014 13:06:25 +0200")
Hello!
John Darrington <jmd@gnu.org> skribis:
> * gnu/packages/web.scm (tinyproxy): New variable.
> * gnu/packages/docbook.scm: Remove #select (tar)
Should be “#:select”.
OK to push, modulo the tiny things below:
> + (alist-replace
> + 'build
> + (lambda* (#:key inputs #:allow-other-keys #:rest args)
> + ;; This stuff is needed, because without it, xmlint etc tries
> + ;; to download docbookx.dtd and docbook.xsl from the net
> + (let ((build (assoc-ref %standard-phases 'build))
> + (docbook-xml (assoc-ref inputs "docbook-xml"))
> + (docbook-xsl (assoc-ref inputs "docbook-xsl"))
> + (our-catalog "/tmp/docbook-xml.xml"))
> + (setenv "XML_CATALOG_FILES" our-catalog)
> + (if (with-output-to-file our-catalog (lambda ()
> + (display (string-append
> + "<?xml version=\"1.0\"?>
> +<!DOCTYPE catalog PUBLIC \"-//OASIS//DTD XML Catalogs V1.0//EN\"
> +\"file:///usr/share/xml/schema/xml-core/catalog.dtd\">
> +<catalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\">
> +<system systemId=\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\"
> +uri=\"file://" docbook-xml "/xml/dtd/docbook/docbookx.dtd\"/>
> +<system systemId=\"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\"
> +uri=\"file://" docbook-xsl "/xml/xsl/docbook-xsl-1.72.0/manpages/docbook.xsl\"/>
> +</catalog>\n"))))
> + (apply build args) #f)))
> + %standard-phases)))
Thanks for digging into it. This will be useful for a number of things,
such as building the Git man pages, so perhaps eventually we’ll
factorize that.
Note that ‘with-output-to-file’ returns *unspecified*, so the else arm
of the ‘if’ is never taken. Also, write “(lambda ()” on the next line.
Lastly, prefer adding a phase before ‘build’ rather than replacing
‘build’ just to call it afterwards.
So, like this:
(alist-cons-before
'build 'pre-build
(lambda ...
...
(with-output-to-file our-catalog
(lambda ()
...))
#t)
%standard-phases)
> + ;; All of the below are used to generate the documentation
> + ;; (Should they be propagated inputs of asciidoc ??)
Not sure. Asciidoc can be used without an XML tool chain, no?
> + (native-inputs `(("asciidoc" ,asciidoc)
> + ("libxml2" ,libxml2)
> + ("docbook-xml" ,docbook-xml)
> + ("docbook-xsl" ,docbook-xsl)
> + ("libxslt" ,libxslt)
> + ("python" ,python-2)))
Why Python? Is it build-time only?
Thanks!
Ludo’.
next prev parent reply other threads:[~2014-06-12 11:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 11:06 [PATCH] gnu: Add tinyproxy John Darrington
2014-06-12 11:59 ` Ludovic Courtès [this message]
2014-06-12 12:19 ` John Darrington
2014-06-12 13:30 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2eeibjt.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=jmd@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).