[bug#62554] gnu: Add book-r5rs.
Commit Message
* 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(+)
Comments
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...
宋文武 <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.
Hello,
> å®ææ¦ <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 also think share/doc/[shortname] is fine.
> >> 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.
IMO, it would be nice to have a dedicated channel for books (including
those with a NC clause, and fictions). Meanwhile, I think Guix can
provide some related to CS and maths. I also think they don’t
necessarily need to be substituable as reproducibility is not
a concern, and compilation time usually negligible.
Meanwhile, I’m going to apply this patch. Antero, are you still
interested in creating and joining the book team or should I ignore the
related patches?
Regards,
@@ -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"))))