guix-kakafarm-channel

Kaka Farm's GNU Guix channel.
git clone https://kaka.farm/~git/guix-kakafarm-channel
Log | Files | Refs | README | LICENSE

texinfo-documents.scm (4031B)


      1 ;;; Kakafarm's Guix Channel
      2 ;;; Copyright © 2023-2024 Yuval Langer <yuval.langer@gmail.com>
      3 ;;;
      4 ;;; This file is part of Kakafarm's Guix Channel.
      5 ;;;
      6 ;;; Kakafarm's Guix Channel is free software; you can redistribute it
      7 ;;; and/or modify it under the terms of the GNU General Public License
      8 ;;; as published by the Free Software Foundation; either version 3 of
      9 ;;; the License, or (at your option) any later version.
     10 ;;;
     11 ;;; Kakafarm's Guix Channel is distributed in the hope that it will be
     12 ;;; useful, but WITHOUT ANY WARRANTY; without even the implied
     13 ;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     14 ;;; See the GNU General Public License for more details.
     15 ;;;
     16 ;;; You should have received a copy of the GNU General Public License
     17 ;;; along with Kakafarm's Guix Channel.  If not, see
     18 ;;; <http://www.gnu.org/licenses/>.
     19 
     20 (define-module (kakafarm packages texinfo-documents)
     21   #:use-module (gnu packages base)
     22   #:use-module (gnu packages gettext)
     23   #:use-module (gnu packages pkg-config)
     24   #:use-module (gnu packages bash)
     25   #:use-module (gnu packages perl-compression)
     26   #:use-module (gnu packages perl)
     27   #:use-module (gnu packages tex)
     28   #:use-module (gnu packages texinfo)
     29 
     30   #:use-module (guix build-system copy)
     31   #:use-module (guix gexp)
     32   #:use-module (guix git-download)
     33   #:use-module ((guix licenses)
     34                 #:select (non-copyleft))
     35   #:use-module (guix packages))
     36 
     37 (define-public (r7rs-small-texinfo target-format)
     38   (let ((commit "38a703976ea6353e32b52a5187dbdaf77fb2f050")
     39         (revision "3")
     40         (git-repository-url "https://codeberg.org/Zipheir/r7rs-small-texinfo/"))
     41     (package
     42       (name (string-append "r7rs-small-" target-format))
     43       (version (git-version "0.1.0" revision commit))
     44       (home-page git-repository-url)
     45       (source
     46        (origin
     47          (uri (git-reference
     48                (url git-repository-url)
     49                (commit commit)))
     50          (method git-fetch)
     51          (file-name (git-file-name name version))
     52          (sha256
     53           (base32 "1fr02fyhiwd364jkfy1n5w31pq3kx1rl5w634421g05702yb47x3"))))
     54       (native-inputs (list bash
     55                            coreutils
     56                            perl-archive-zip
     57                            texinfo
     58                            texlive-scheme-small
     59                            texlive-texinfo
     60                            sed
     61                            grep
     62                            perl
     63                            which
     64                            pkg-config
     65                            gettext-minimal))
     66       (inputs '())
     67       (build-system copy-build-system)
     68       (arguments
     69        (list
     70         #:install-plan #~`((,(string-append "r7rs-small."
     71                                             #$target-format) ,(string-append
     72                                                                "share/"
     73                                                                #$target-format
     74                                                                "/")))
     75         #:phases #~(modify-phases %standard-phases
     76                      (add-after 'patch-source-shebangs 'compile-the-files
     77                        (lambda _
     78                          (chdir "doc/r7rs-small")
     79                          (system* "makeinfo" "--help")
     80                          (system* "bash" "build.sh"
     81                                   #$target-format))))))
     82       (synopsis (string-append
     83                  "R7RS Small standard of the Scheme programming language in "
     84                  target-format " format"))
     85       (description (string-append
     86                     "Revised^7 Report of the Algorithmic Language Scheme adapted to Texinfo format. This package installs the  "
     87                     target-format " version of the document."))
     88       (license (non-copyleft "file://COPYING")))))
     89 
     90 (define-public r7rs-small-epub
     91   (r7rs-small-texinfo "epub"))
     92 (define-public r7rs-small-html
     93   (r7rs-small-texinfo "html"))
     94 (define-public r7rs-small-info
     95   (r7rs-small-texinfo "info"))
     96 (define-public r7rs-small-pdf
     97   (r7rs-small-texinfo "pdf"))