all messages for Guix-related lists mirrored at yhetil.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

* [bug#62554] [PATCH 1/3] gnu: Add rrrs2txi.
  2023-03-31  3:28 [bug#62554] [PATCH] gnu: Add book-r5rs Antero Mejr via Guix-patches via
@ 2023-03-31  3:36 ` 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
  1 sibling, 2 replies; 6+ messages in thread
From: Antero Mejr via Guix-patches via @ 2023-03-31  3:36 UTC (permalink / raw)
  To: 62554

* 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@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





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

* [bug#62554] [PATCH 2/3] teams: Add book team.
  2023-03-31  3:36 ` [bug#62554] [PATCH 1/3] gnu: Add rrrs2txi Antero Mejr via Guix-patches via
@ 2023-03-31  3:36   ` 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
  1 sibling, 0 replies; 6+ messages in thread
From: Antero Mejr via Guix-patches via @ 2023-03-31  3:36 UTC (permalink / raw)
  To: 62554

* 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$"))))
+
 \f
 (define-member (person "Eric Bavier"
                        "bavier@posteo.net")
-- 
2.38.1





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

* [bug#62554] [PATCH 3/3] teams: Add Antero Mejr.
  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   ` Antero Mejr via Guix-patches via
  1 sibling, 0 replies; 6+ messages in thread
From: Antero Mejr via Guix-patches via @ 2023-03-31  3:36 UTC (permalink / raw)
  To: 62554

* 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@163.com")
   localization xfce)
 
+(define-member (person "Antero Mejr"
+                       "antero@mailbox.org")
+  book)
+
 \f
 (define (find-team name)
   (or (hash-ref %teams (string->symbol name))
-- 
2.38.1





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

* [bug#62554] [PATCH] gnu: Add book-r5rs.
  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-04-09  5:41 ` 宋文武 via Guix-patches via
  2023-04-18  1:30   ` Antero Mejr via Guix-patches via
  1 sibling, 1 reply; 6+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-04-09  5:41 UTC (permalink / raw)
  To: Antero Mejr; +Cc: 62554

Antero Mejr <antero@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...




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

* [bug#62554] [PATCH] gnu: Add book-r5rs.
  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
  0 siblings, 0 replies; 6+ messages in thread
From: Antero Mejr via Guix-patches via @ 2023-04-18  1:30 UTC (permalink / raw)
  To: 宋文武; +Cc: 62554

宋文武 <iyzsong@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.




^ permalink raw reply	[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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.