commit dc25ee46b225149b4368c0091d16e46f1664e64d
parent d624d1ad6d7d42c34823bfe13f248507260c1df8
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Sun, 12 May 2024 07:04:55 +0300
Add more r7rs-small packages each targeting a different file format.
Diffstat:
1 file changed, 46 insertions(+), 19 deletions(-)
diff --git a/kakafarm/packages/texinfo-documents.scm b/kakafarm/packages/texinfo-documents.scm
@@ -20,6 +20,8 @@
(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)
@@ -29,11 +31,11 @@
#:select (non-copyleft))
#:use-module (guix packages))
-(define-public r7rs-small-texinfo
+(define-public (r7rs-small-texinfo target-format)
(let ((commit "38a703976ea6353e32b52a5187dbdaf77fb2f050")
(revision "3"))
(package
- (name "r7rs-small-texinfo")
+ (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
@@ -45,31 +47,56 @@
(file-name (git-file-name name version))
(sha256
(base32 "1fr02fyhiwd364jkfy1n5w31pq3kx1rl5w634421g05702yb47x3"))))
- (native-inputs (list bash texinfo))
+ (native-inputs (list bash
+ coreutils
+ perl-archive-zip
+ texinfo
+ texlive-scheme-small
+ texlive-texinfo))
(inputs '())
(build-system copy-build-system)
(arguments
(list
- #:install-plan #~'(("r7rs-small.info" "share/info/"))
+ #: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"))
- (build-script-path (string-append
- source-directory-path
- "/build.sh"))
- (info-directory-path (string-append #$output
- "/share/info")))
+ (target-directory-path (string-append #$output
+ "/share/"
+ #$target-format)))
(chdir source-directory-path)
- (system* "bash" build-script-path "info")
- (mkdir-p info-directory-path)
- (copy-file (string-append source-directory-path
- "/r7rs-small.info")
- (string-append info-directory-path
- "/r7rs-small.info"))))))))
- (synopsis
- "R7RS Small standard of the Scheme programming language in Info format")
- (description
- "Revised^7 Report of the Algorithmic Language Scheme adapted to Texinfo format.")
+ (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"))