unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Yuval Langer <yuvallangerontheroad@gmail.com>
To: help-guix@gnu.org
Subject: Problem: a makeinfo running in build stages cannot output epub3?
Date: Sun, 12 May 2024 07:17:32 +0300	[thread overview]
Message-ID: <CABKQn8HNneEDMtRdJsj_v-4SF058JxJ_uKdPiAhynvqRgJBDkw@mail.gmail.com> (raw)

[-- 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"))

                 reply	other threads:[~2024-05-13 18:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CABKQn8HNneEDMtRdJsj_v-4SF058JxJ_uKdPiAhynvqRgJBDkw@mail.gmail.com \
    --to=yuvallangerontheroad@gmail.com \
    --cc=help-guix@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.
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).