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: unison: Add "doc" output. Date: Fri, 08 Jan 2016 11:19:34 +0100 Message-ID: <87oacwl6fd.fsf@gnu.org> References: <20151218194215.50af651c@openmailbox.org> <8737uwu5xg.fsf@gnu.org> <20151220220138.1346f5b5@PocketWee> <8760zsozld.fsf@gnu.org> <20160108011341.263e863a@openmailbox.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]:44729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHU8z-00084S-Cj for guix-devel@gnu.org; Fri, 08 Jan 2016 05:19:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHU8v-0003AN-Nd for guix-devel@gnu.org; Fri, 08 Jan 2016 05:19:41 -0500 In-Reply-To: <20160108011341.263e863a@openmailbox.org> (Eric Bavier's message of "Fri, 8 Jan 2016 01:13:41 -0600") 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: Eric Bavier Cc: guix-devel@gnu.org Eric Bavier skribis: > From c8a0086db4d78091e06326a5ffe55a7bf2543091 Mon Sep 17 00:00:00 2001 > From: Eric Bavier > Date: Fri, 18 Dec 2015 19:29:22 -0600 > Subject: [PATCH] gnu: unison: Add "doc" output. > > * gnu/packages/ocaml.scm (unison)[source]: Use svn-fetch with snippet. > [outputs]: New field. > [native-inputs]: Add ghostscript, texlive, hevea, and lynx. > [arguments]: Add 'install-doc phase. [...] > + (snippet > + `(begin > + ;; The svn revision in the release tarball appears to be > + ;; artificially manipulated in order to set the desired point > + ;; version number. Because the point version is calculated = during > + ;; the build, we can offset pointVersionOrigin by the desired > + ;; point version and write that into "Rev: %d". We do this = rather > + ;; than hardcoding the necessary revision number, for > + ;; maintainability. Fun. :-) > + (with-atomic-file-replacement "src/mkProjectInfo.ml" > + (lambda (in out) > + (let ((pt-ver (string->number (third (string-split ,vers= ion #\.)))) > + (pt-rx (make-regexp "^let pointVersionOrigin =3D = ([0-9]+)")) > + (rev-rx (make-regexp "Rev: [0-9]+"))) > + (let loop ((pt-origin #f)) > + (let ((line (read-line in 'concat))) > + (cond > + ((regexp-exec pt-rx line) > + =3D> (lambda (m) > + (begin =E2=80=98begin=E2=80=99 can be omitted here=E2=80=A6 > + ((regexp-exec rev-rx line) > + =3D> (lambda (m) > + (begin =E2=80=A6 and here. > + (for-each (lambda (f) > + (install-file f doc)) > + (map (lambda (ext) > + (string-append > + "doc/unison-manual." ext)) > + '("ps" "pdf" "dvi" "html"))) What about installing only HTML? I find that HTML (and Info, and man) is more convenient to read on-line than PDFs. We rarely include PDF documentation in packages. Of course, avoiding PDF/PS/DVI allows us to remove the dependency on TeX=C2=A0Live. Last, from discussions I heard at the Reproducible Build Summit, I think DVIs and maybe PS/PDFs are not bit-reproducible out-of-the-box. WDYT? Maybe we should have a policy on how to choose the installed documentation formats. Thanks for finding out how to build documentation from source! Ludo=E2=80=99.