[PATCH] gnu: book-sparc: Update to 2.2.0.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Artyom V. Poptsov
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal

Debbugs page

Artyom V. Poptsov wrote 5 months ago
(address . guix-patches@gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
328a2d40fa5843b6e5d2dda1a2bfa78576e603e2.1729110923.git.poptsov.artyom@gmail.com
* gnu/packages/books.scm (book-sparc): Update to 2.2.0.
[inputs]: Add git, gnu-make, texlive-fancyvrb, and texlive-upquote.
[native-inputs]: Add autoconf and automake.

Change-Id: Icd19f295b8572428aea39f46c27e22f87d5dc7e1
---
gnu/packages/books.scm | 62 +++++++++++++++++++++++++-----------------
1 file changed, 37 insertions(+), 25 deletions(-)

Toggle diff (109 lines)
diff --git a/gnu/packages/books.scm b/gnu/packages/books.scm
index 5a6157d557..9f680b51e2 100644
--- a/gnu/packages/books.scm
+++ b/gnu/packages/books.scm
@@ -42,7 +42,7 @@ (define-module (gnu packages books)
(define-public book-sparc
(package
(name "book-sparc")
- (version "2.1.0")
+ (version "2.2.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -50,24 +50,14 @@ (define-public book-sparc
(commit (string-append "v" version))))
(sha256
(base32
- "1ns2vs5yb9z1hj9gq5y55qz7c9azzhr866b665s8fq50q5m4yhbc"))
+ "08aswb6cb02c0yqpkyj4vmfjvdjsffxqcqabivgv2gcgn8mhi4wm"))
(file-name (git-file-name name version))
- (modules '((guix build utils)))
- (snippet
- #~(begin
- (substitute* "version.tex.in"
- (("@COMMIT@") ""))
- (substitute* "Makefile"
- (("all: sparc.pdf") "all: install")
- (("^sparc.pdf:") "install:")
- (("(cp out/sparc.pdf) sparc.pdf" all cp)
- (string-append
- "mkdir -p $(DESTDIR)$(PREFIX)/share/doc/book-sparc"
- " && " cp
- " $(DESTDIR)$(PREFIX)/share/doc/book-sparc/sparc.pdf")))))))
+ (modules '((guix build utils)))))
(build-system gnu-build-system)
(native-inputs
- (list bash-minimal
+ (list autoconf
+ automake
+ bash-minimal
fontconfig
inkscape
lilypond
@@ -76,6 +66,8 @@ (define-public book-sparc
which))
(inputs
(list font-liberation
+ git
+ gnu-make
texlive-acronym
texlive-adjustbox
texlive-biblatex
@@ -85,6 +77,7 @@ (define-public book-sparc
texlive-chngcntr
texlive-circuitikz
texlive-collection-langcyrillic
+ texlive-fancyvrb
texlive-fontspec
texlive-glossaries
texlive-glossaries-english
@@ -101,16 +94,35 @@ (define-public book-sparc
texlive-textpos
texlive-transparent
texlive-trimspaces
+ texlive-upquote
texlive-xetex))
- (arguments
- (list #:phases
- #~(modify-phases %standard-phases
- (delete 'check)
- (delete 'configure)
- (add-before 'build 'set-envs
- (lambda _
- (setenv "REPRODUCIBILITY" "yes")
- (setenv "PREFIX" #$output))))))
+ (arguments
+ (list #:tests? #f ; no tests
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'configure-environment
+ (lambda* (#:key inputs make-flags parallel-build?
+ #:allow-other-keys)
+ (use-modules (ice-9 regex)
+ (srfi srfi-1))
+ (let* ((src (assoc-ref inputs "source"))
+ (rx (make-regexp "/gnu/store/(.*)-book-sparc-.*"))
+ (src-hash (match:substring (regexp-exec rx src) 1))
+ (random-seed
+ (fold (lambda (ch prev)
+ (+ (char->integer ch)
+ prev))
+ 0
+ (string->list src-hash))))
+ (setenv "RANDOMSEED" (number->string random-seed))
+ (setenv "REPRODUCIBILITY" "yes"))))
+ (replace 'install
+ (lambda _
+ (let ((doc-dir (string-append #$output
+ "/share/doc/sparc/")))
+ (mkdir-p doc-dir)
+ (copy-file "sparc.pdf"
+ (string-append doc-dir
+ "sparc.pdf"))))))))
(home-page "https://github.com/artyom-poptsov/SPARC")
(synopsis "Book on combining art and technology")
(description

base-commit: d95588242c605fbb72e25fe36a0903a1538e9018
--
2.46.0
Ludovic Courtès wrote 5 months ago
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 73841@debbugs.gnu.org)
87ttd9pph1.fsf@gnu.org
Hi,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> skribis:

Toggle quote (6 lines)
> * gnu/packages/books.scm (book-sparc): Update to 2.2.0.
> [inputs]: Add git, gnu-make, texlive-fancyvrb, and texlive-upquote.
> [native-inputs]: Add autoconf and automake.
>
> Change-Id: Icd19f295b8572428aea39f46c27e22f87d5dc7e1

[...]

Toggle quote (5 lines)
> (inputs
> (list font-liberation
> + git
> + gnu-make

I believe ‘gnu-make’ is unnecessary: it’s included by
‘gnu-build-system’.

Toggle quote (7 lines)
> + #:phases #~(modify-phases %standard-phases
> + (add-before 'build 'configure-environment
> + (lambda* (#:key inputs make-flags parallel-build?
> + #:allow-other-keys)
> + (use-modules (ice-9 regex)
> + (srfi srfi-1))

Please avoid ‘use-modules’ in a non-top-level context: it’s not
guaranteed to work.

Instead, use #:modules.

Toggle quote (9 lines)
> + (replace 'install
> + (lambda _
> + (let ((doc-dir (string-append #$output
> + "/share/doc/sparc/")))
> + (mkdir-p doc-dir)
> + (copy-file "sparc.pdf"
> + (string-append doc-dir
> + "sparc.pdf"))))))))

Shorter: (install-file "sparc.pdf" doc-dir).

Otherwise LGTM!

Ludo’.
Artyom V. Poptsov wrote 5 months ago
Re: [PATCH] gnu: book-sparc: Update to 2.2.0.
(address . 73841-done@debbugs.gnu.org)
87a5f0t8pl.fsf@gmail.com
Pushed to "master" branch as 48097f511929053468ce6f09e0a24644c90fe670.

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmcTz6oZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFflzOD/4sNGRbEhHN88XWlHnOohS3
nwAdvX/djT/WYaoPn6Z4EPm5GQuN4Emg84+lRQr5lPXylUSL+9Hz3MeiRycvDdaY
UC0Xnh46scvw8am7dwfFBsS3UziruqFT0fJn8RXFJL1YecFhv87X3r5dZ2FtTcUe
/H5XJwjU93G6D4yKBzCTUoOFIPnZzXhgUXohzv9ripSSzwCqXyL6iODENihcipCG
fTVrafAixQqGMlVnYaOrZmvq59Xqgxe7RX78mOpT69x4VGMIJKQxsXVavZmDlEC1
Os72S0m5gQJHkYfJabhgDJDnw/4CdwNgq0nJex8Le6MTGKuxM8FGarbYYeEWMD/s
NLZmJhW+ub9ZDA3QrHGSpMSstqb8c2qcwRt0W9wDahLQjn7pMXfFNvVPbRSIixRL
fUiufJLTI8r5eOcriwWmWv1szDjfk+/43oaDNp17AI9jdP772QheikrIw6ezinpW
aJjMVGe9s2qF5H16dwWskahMYKAh6YgDw8KTIrxqsbrXiWNZZTaIOui0hwSJCRx0
WUY+sOsQ0vXa6qaoit5JeV/camoEklKABfR9JVPWWa8ldzwu1w06oXi6iHcs3G33
gmENfmHlx7PNdGn5wP+dvOcfhfMewfxTGYS8qmrhLDBQWlAFQJcBslYAtYiNkq2+
/wEb1rFrzPefYL2/G1y5Lg==
=Wrij
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 73841@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73841
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help