* Problem: a makeinfo running in build stages cannot output epub3?
@ 2024-05-12 4:17 Yuval Langer
2024-07-11 9:46 ` Simon Tournier
0 siblings, 1 reply; 2+ messages in thread
From: Yuval Langer @ 2024-05-12 4:17 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
Hello,
I am writing package definitions for a certain Texinfo document, the
r7rs-small. Each package would create another file format, so:
r7rs-small-info, r7rs-small-pdf, r7rs-small-epub, etc.
I am having problems generating epub because the native-input texinfo
package does not accept the `--epub3` (or `--epub`) flag. I have
tried adding the perl-archive-zip package as well, but that did not
work.
Attached is the script with the package definitions.
p.s., if you have any criticism regarding the structure of the package
definition and the (lack of?) wisdom in defining different packages
using a single procedure, please provide them.
[-- Attachment #2: texinfo-documents.scm --]
[-- Type: text/x-scheme, Size: 4382 bytes --]
;;; Kakafarm's Guix Channel
;;; Copyright © 2023-2024 Yuval Langer <yuval.langer@gmail.com>
;;;
;;; This file is part of Kakafarm's Guix Channel.
;;;
;;; Kakafarm's Guix Channel is free software; you can redistribute it
;;; and/or modify it under the terms of the GNU General Public License
;;; as published by the Free Software Foundation; either version 3 of
;;; the License, or (at your option) any later version.
;;;
;;; Kakafarm's Guix Channel is distributed in the hope that it will be
;;; useful, but WITHOUT ANY WARRANTY; without even the implied
;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
;;; See the GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with Kakafarm's Guix Channel. If not, see
;;; <http://www.gnu.org/licenses/>.
(define-module (kakafarm packages texinfo-documents)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages perl-compression)
#:use-module (gnu packages tex)
#:use-module (gnu packages texinfo)
#:use-module (guix build-system copy)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses)
#:select (non-copyleft))
#:use-module (guix packages))
(define-public (r7rs-small-texinfo target-format)
(let ((commit "38a703976ea6353e32b52a5187dbdaf77fb2f050")
(revision "3"))
(package
(name (string-append "r7rs-small-" target-format))
(version (git-version "0.1.0" revision commit))
(home-page "https://codeberg.org/Zipheir/r7rs-small-texinfo/")
(source
(origin
(uri (git-reference
(url home-page)
(commit commit)))
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32 "1fr02fyhiwd364jkfy1n5w31pq3kx1rl5w634421g05702yb47x3"))))
(native-inputs (list bash
coreutils
perl-archive-zip
texinfo
texlive-scheme-small
texlive-texinfo))
(inputs '())
(build-system copy-build-system)
(arguments
(list
#:install-plan #~`((,(string-append "r7rs-small."
#$target-format) ,(string-append
"share/"
#$target-format
"/")))
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'compile-the-files
(lambda _
(let* ((source-directory-path (string-append (getcwd)
"/doc/r7rs-small"))
(target-directory-path (string-append #$output
"/share/"
#$target-format)))
(chdir source-directory-path)
(system* "bash" "build.sh"
#$target-format)
(mkdir-p target-directory-path)
(copy-file (string-append "r7rs-small."
#$target-format)
(string-append target-directory-path
"/r7rs-small."
#$target-format))))))))
(synopsis (string-append
"R7RS Small standard of the Scheme programming language in "
target-format " format"))
(description (string-append
"Revised^7 Report of the Algorithmic Language Scheme adapted to Texinfo format.
This package installs the "
target-format " version of the document."))
(license (non-copyleft "file://COPYING")))))
(define-public r7rs-small-info
(r7rs-small-texinfo "info"))
(define-public r7rs-small-pdf
(r7rs-small-texinfo "pdf"))
(define-public r7rs-small-html
(r7rs-small-texinfo "html"))
(define-public r7rs-small-epub
(r7rs-small-texinfo "epub"))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem: a makeinfo running in build stages cannot output epub3?
2024-05-12 4:17 Problem: a makeinfo running in build stages cannot output epub3? Yuval Langer
@ 2024-07-11 9:46 ` Simon Tournier
0 siblings, 0 replies; 2+ messages in thread
From: Simon Tournier @ 2024-07-11 9:46 UTC (permalink / raw)
To: Yuval Langer, help-guix
Hi,
Sorry for the late reply.
On Sun, 12 May 2024 at 07:17, Yuval Langer <yuvallangerontheroad@gmail.com> wrote:
> I am having problems generating epub because the native-input texinfo
> package does not accept the `--epub3` (or `--epub`) flag. I have
> tried adding the perl-archive-zip package as well, but that did not
> work.
Indeed, I get this error using the example you provided.
--8<---------------cut here---------------start------------->8---
$ guix build -L . r7rs-small-epub
[...]
phase `unpack' succeeded after 0.0 seconds
starting phase `compile-the-files'
makeinfo --set-customization-variable HTML_MATH=mathjax --no-split --epub r7rs-small.texinfo
Unknown option: epub
error: in phase 'compile-the-files': uncaught exception:
[...]
--8<---------------cut here---------------end--------------->8---
And if one replace ’epub’ by ’epub3’, the error seems still there:
--8<---------------cut here---------------start------------->8---
starting phase `unpack-fix'
phase `unpack-fix' succeeded after 0.0 seconds
starting phase `compile-the-files'
makeinfo --set-customization-variable HTML_MATH=mathjax --no-split --epub3 r7rs-small.texinfo
Unknown option: epub3
error: in phase 'compile-the-files': uncaught exception:
--8<---------------cut here---------------end--------------->8---
Since,
$ guix shell -C texinfo -- makeinfo --help | grep -C 5 epub
--version display version information and exit.
Output format selection (default is to produce Info):
--docbook output Docbook XML.
--html output HTML.
--epub3 output EPUB 3.
--latex output LaTeX.
--plaintext output plain text rather than Info.
--xml output Texinfo XML.
--dvi, --dvipdf, --ps, --pdf call texi2dvi to generate given output,
after checking validity of TEXINFO-FILE.
indeed, something is unexpected. Note that the package ’texinfo’
contains:
--8<---------------cut here---------------start------------->8---
(inputs (modify-inputs (package-inputs texinfo)
(append perl-archive-zip))) ;needed for 'tex2any --epub3'
--8<---------------cut here---------------end--------------->8---
Hum, I do not know where the issue could come from.
Cheers,
simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-11 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-12 4:17 Problem: a makeinfo running in build stages cannot output epub3? Yuval Langer
2024-07-11 9:46 ` Simon Tournier
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).