GNU bug report logs - #62554
[PATCH] gnu: Add book-r5rs.

Previous Next

Package: guix-patches;

Reported by: Antero Mejr <antero <at> mailbox.org>

Date: Fri, 31 Mar 2023 03:30:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 62554 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#62554; Package guix-patches. (Fri, 31 Mar 2023 03:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Antero Mejr <antero <at> mailbox.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 31 Mar 2023 03:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add book-r5rs.
Date: Fri, 31 Mar 2023 03:28:41 +0000
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#62554; Package guix-patches. (Fri, 31 Mar 2023 03:37:02 GMT) Full text and rfc822 format available.

Message #8 received at 62554 <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: 62554 <at> debbugs.gnu.org
Subject: [PATCH 1/3] gnu: Add rrrs2txi.
Date: Fri, 31 Mar 2023 03:36:19 +0000
* gnu/packages/book-software.scm (rrrs2txi): New package.
* gnu/local.mk (book-software.scm): Add file.
---
 gnu/local.mk                   |  1 +
 gnu/packages/book-software.scm | 50 ++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 gnu/packages/book-software.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index aee0b8a645..10070db09a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -147,6 +147,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/bioinformatics.scm		\
   %D%/packages/bittorrent.scm			\
   %D%/packages/bison.scm			\
+  %D%/packages/book-software.scm		\
   %D%/packages/boost.scm			\
   %D%/packages/bootloaders.scm			\
   %D%/packages/bootstrap.scm			\
diff --git a/gnu/packages/book-software.scm b/gnu/packages/book-software.scm
new file mode 100644
index 0000000000..ca4e47b89e
--- /dev/null
+++ b/gnu/packages/book-software.scm
@@ -0,0 +1,50 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Antero Mejr <antero <at> mailbox.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix 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.
+;;;
+;;; GNU Guix 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 GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages book-software)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages scheme)
+  #:use-module (gnu packages tex)
+  #:use-module (gnu packages texinfo)
+  #:use-module (guix build-system copy)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (guix utils)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public rrrs2txi
+  (package
+    (name "rrrs2txi")
+    (version "2001-03-28")
+    (source (origin
+              (method url-fetch)
+              (uri "https://people.csail.mit.edu/jaffer/rrrs2txi.scm")
+              (sha256
+               (base32
+                "11bmm0c2plri0mf3jjabjpbs342h4983s8jdlsvhxr384j2nlyai"))))
+    (build-system copy-build-system)
+    (arguments
+     (list #:install-plan #~'(("rrrs2txi.scm" "lib/"))))
+    (home-page "https://people.csail.mit.edu/jaffer/Scheme.html")
+    (synopsis "Translate LaTeX sources r3rs, r4rs, and r5rs to texinfo")
+    (description
+     "This package provides @code{rrrs2txi.scm}, which
+translates the LaTeX r3rs, r4rs, and r5rs to texinfo format (r3rs.txi,
+r4rs.txi, and r5rs.txi).")
+    (license license:bsd-3)))
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#62554; Package guix-patches. (Fri, 31 Mar 2023 03:37:02 GMT) Full text and rfc822 format available.

Message #11 received at 62554 <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: 62554 <at> debbugs.gnu.org
Subject: [PATCH 2/3] teams: Add book team.
Date: Fri, 31 Mar 2023 03:36:20 +0000
* etc/teams.scm.in (book): New team.
---
 etc/teams.scm.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/etc/teams.scm.in b/etc/teams.scm.in
index 4c95c48543..cce6293dc7 100644
--- a/etc/teams.scm.in
+++ b/etc/teams.scm.in
@@ -463,6 +463,12 @@ (define-team lxqt
         #:description "LXQt desktop environment."
         #:scope (list "gnu/packages/lxqt.scm")))
 
+(define-team book
+  (team 'book
+        #:name "Book team"
+        #:description "Books and documentation."
+        #:scope (list (make-regexp "^gnu/packages/book(-.+|)\\.scm$"))))
+
 
 (define-member (person "Eric Bavier"
                        "bavier <at> posteo.net")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#62554; Package guix-patches. (Fri, 31 Mar 2023 03:37:02 GMT) Full text and rfc822 format available.

Message #14 received at 62554 <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: 62554 <at> debbugs.gnu.org
Subject: [PATCH 3/3] teams: Add Antero Mejr.
Date: Fri, 31 Mar 2023 03:36:21 +0000
* etc/teams.scm.in: Add Antero Mejr.
---
 etc/teams.scm.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/etc/teams.scm.in b/etc/teams.scm.in
index cce6293dc7..f7cf20067f 100644
--- a/etc/teams.scm.in
+++ b/etc/teams.scm.in
@@ -578,6 +578,10 @@ (define-member (person "Zhu Zihao"
                        "all_but_last <at> 163.com")
   localization xfce)
 
+(define-member (person "Antero Mejr"
+                       "antero <at> mailbox.org")
+  book)
+
 
 (define (find-team name)
   (or (hash-ref %teams (string->symbol name))
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#62554; Package guix-patches. (Sun, 09 Apr 2023 05:41:01 GMT) Full text and rfc822 format available.

Message #17 received at 62554 <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: Antero Mejr <antero <at> mailbox.org>
Cc: 62554 <at> debbugs.gnu.org
Subject: Re: bug#62554: [PATCH] gnu: Add book-r5rs.
Date: Sun, 09 Apr 2023 13:41:06 +0800
Antero Mejr <antero <at> mailbox.org> writes:

> * 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]".

Good idea, I'll rename 'faif' to 'book-faif' later.

> 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?

I don't know any former proposed/discussion.  Well I'd like to also
include translations, eg:

https://github.com/lifanxi/free-as-in-freedom-zh-cn
https://github.com/beijinglug/fsfs-zh


For non-technical books, maybe math books? eg:

https://discrete.openmathbooks.org/dmoi3.html

I'm not sure though, due to lack of confidence to make a judge...




Information forwarded to guix-patches <at> gnu.org:
bug#62554; Package guix-patches. (Tue, 18 Apr 2023 01:32:02 GMT) Full text and rfc822 format available.

Message #20 received at 62554 <at> debbugs.gnu.org (full text, mbox):

From: Antero Mejr <antero <at> mailbox.org>
To: 宋文武 <iyzsong <at> envs.net>
Cc: 62554 <at> debbugs.gnu.org
Subject: Re: bug#62554: [PATCH] gnu: Add book-r5rs.
Date: Tue, 18 Apr 2023 01:30:55 +0000
宋文武 <iyzsong <at> envs.net> writes:

>> 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]".
>
> Good idea, I'll rename 'faif' to 'book-faif' later.

Do you think it would be a good idea to install the files to
/share/doc/[shortname]/, or just /share/doc/? I used the first one to
avoid cluttering /share/doc/, or maybe for organization purposes if a
book is split into multiple files. But I can update this patch to use
/share/doc/ if you disagree.

>> 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?
>
> I don't know any former proposed/discussion.  Well I'd like to also
> include translations, eg:
>
> https://github.com/lifanxi/free-as-in-freedom-zh-cn
> https://github.com/beijinglug/fsfs-zh

Sounds good to me.

> For non-technical books, maybe math books? eg:
>
> https://discrete.openmathbooks.org/dmoi3.html
>
> I'm not sure though, due to lack of confidence to make a judge...

I would definitely want math books. I would be OK with any non-fiction
work so long as it can be typeset from source and is freely licensed,
but then there might be a lot of book packages.




This bug report was last modified 1 year and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.