From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: Add tinyproxy. Date: Thu, 12 Jun 2014 13:59:02 +0200 Message-ID: <87d2eeibjt.fsf@gnu.org> References: <1402571185-31488-1-git-send-email-jmd@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wv3ey-000115-Bj for guix-devel@gnu.org; Thu, 12 Jun 2014 07:59:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wv3et-0005ib-Ma for guix-devel@gnu.org; Thu, 12 Jun 2014 07:59:12 -0400 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") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: John Darrington Cc: guix-devel@gnu.org Hello! John Darrington skribis: > * gnu/packages/web.scm (tinyproxy): New variable. > * gnu/packages/docbook.scm: Remove #select (tar) Should be =E2=80=9C#:select=E2=80=9D. 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 > + " > + +\"file:///usr/share/xml/schema/xml-core/catalog.dtd\"> > + > + +uri=3D\"file://" docbook-xml "/xml/dtd/docbook/docbookx.dtd\"/> > + +uri=3D\"file://" docbook-xsl "/xml/xsl/docbook-xsl-1.72.0/manpages/docb= ook.xsl\"/> > +\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=E2=80=99ll factorize that. Note that =E2=80=98with-output-to-file=E2=80=99 returns *unspecified*, so t= he else arm of the =E2=80=98if=E2=80=99 is never taken. Also, write =E2=80=9C(lambda (= )=E2=80=9D on the next line. Lastly, prefer adding a phase before =E2=80=98build=E2=80=99 rather than re= placing =E2=80=98build=E2=80=99 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)=20 > + ("docbook-xml" ,docbook-xml) > + ("docbook-xsl" ,docbook-xsl) > + ("libxslt" ,libxslt)=20 > + ("python" ,python-2))) Why Python? Is it build-time only? Thanks! Ludo=E2=80=99.