Message ID | 20230331032841.27505-1-antero@mailbox.org |
---|---|
State | New |
Headers | show |
Series | [bug#62554] gnu: Add book-r5rs. | expand |
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.
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"))))