unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#62554] [PATCH] gnu: Add book-r5rs.
@ 2023-03-31  3:28 Antero Mejr via Guix-patches via
  2023-03-31  3:36 ` [bug#62554] [PATCH 1/3] gnu: Add rrrs2txi Antero Mejr via Guix-patches via
  2023-04-09  5:41 ` [bug#62554] [PATCH] gnu: Add book-r5rs 宋文武 via Guix-patches via
  0 siblings, 2 replies; 6+ messages in thread
From: Antero Mejr via Guix-patches via @ 2023-03-31  3:28 UTC (permalink / raw)
  To: 62554

* gnu/packages/book-software.scm (book-r5rs): New variable.
---
Please apply this patch last.
This patch is for the R5RS spec document, in PDF and Info formats.
Not sure what conventions would work best, but here I used:
1. package definitions for books/documents go into the file
   "book-[type].scm".
2. package definition names are formatted "book-[shortname]".
3. PDF is installed into share/doc/shortname.
4. other formats go into the appropriate path for their file type,
   or share/doc/shortname.

I think distributing books and documentation through Guix, especially
technical or FOSS-related, is an interesting idea.
Maybe these packages could go in the same .scm file as iyzsong's package for
the book "Free as in Freedom":
https://issues.guix.gnu.org/62545

I would be interested to hear what others think about books in Guix.
Would we want to limit to technical books? What about translations?
Has this already been proposed somewhere?

 gnu/packages/book-software.scm | 38 ++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/book-software.scm b/gnu/packages/book-software.scm
index ca4e47b89e..35ad76399e 100644
--- a/gnu/packages/book-software.scm
+++ b/gnu/packages/book-software.scm
@@ -48,3 +48,41 @@ (define-public rrrs2txi
 translates the LaTeX r3rs, r4rs, and r5rs to texinfo format (r3rs.txi,
 r4rs.txi, and r5rs.txi).")
     (license license:bsd-3)))
+
+(define-public book-r5rs
+  (package
+    (name "book-r5rs")
+    (version "5")
+    (source (origin
+              (method url-fetch)
+              (uri
+               "https://groups.csail.mit.edu/mac/ftpdir/scheme-reports/r5rs.tar.gz")
+              (sha256
+               (base32
+                "12c6087zdffigmdl9bx1xv71si9jfpffsbpimivx3j80j8hvxrci"))))
+    (build-system copy-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-before 'install 'build
+                          (lambda _
+                            (invoke "pdflatex" "r5rs.tex")
+                            (invoke "pdflatex" "r5rs.tex")
+                            (system* "scm" "-f" ;expected to fail
+                                     (string-append
+                                      #$(this-package-native-input "rrrs2txi")
+                                      "/lib/rrrs2txi.scm")
+                                     "-e" "(go)")
+                            ;; forcing because the online txi is broken too
+                            (invoke "makeinfo" "--force" "r5rs.txi"))))
+           #:install-plan #~'(("r5rs.pdf" "share/doc/r5rs/")
+                              ("r5rs.info" "share/info/"))))
+    (native-inputs (list rrrs2txi scm texinfo
+                         (texlive-updmap.cfg (list texlive-fonts-ec))))
+    (home-page "https://people.csail.mit.edu/jaffer/Scheme.html")
+    (synopsis "Specification for the R5RS implementation of Scheme")
+    (description
+     "The report gives a defining description of the programming language
+Scheme.  Scheme is a statically scoped and properly tail-recursive dialect of
+the Lisp programming language.")
+    (license (license:non-copyleft
+              "https://people.csail.mit.edu/jaffer/Scheme_TERMS.html"))))
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-18  1:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31  3:28 [bug#62554] [PATCH] gnu: Add book-r5rs Antero Mejr via Guix-patches via
2023-03-31  3:36 ` [bug#62554] [PATCH 1/3] gnu: Add rrrs2txi Antero Mejr via Guix-patches via
2023-03-31  3:36   ` [bug#62554] [PATCH 2/3] teams: Add book team Antero Mejr via Guix-patches via
2023-03-31  3:36   ` [bug#62554] [PATCH 3/3] teams: Add Antero Mejr Antero Mejr via Guix-patches via
2023-04-09  5:41 ` [bug#62554] [PATCH] gnu: Add book-r5rs 宋文武 via Guix-patches via
2023-04-18  1:30   ` Antero Mejr via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).