aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2024-10-16 23:26:12 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2024-10-19 00:57:41 +0300
commit48097f511929053468ce6f09e0a24644c90fe670 (patch)
tree5293ae3ce51e2b566d3abd0401b64971a054ac47 /gnu
parentcdc69de97d4afec0c651b1ba686936272c9bcc85 (diff)
downloadguix-48097f511929053468ce6f09e0a24644c90fe670.tar
guix-48097f511929053468ce6f09e0a24644c90fe670.tar.gz
gnu: book-sparc: Update to 2.2.0.
* 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. Reviewed-by: Ludovic Courtès <ludo@gnu.org> Change-Id: Icd19f295b8572428aea39f46c27e22f87d5dc7e1
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/books.scm59
1 files changed, 34 insertions, 25 deletions
diff --git a/gnu/packages/books.scm b/gnu/packages/books.scm
index 5a6157d557..7a5c849d60 100644
--- a/gnu/packages/books.scm
+++ b/gnu/packages/books.scm
@@ -42,7 +42,7 @@
(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 @@
(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,7 @@
which))
(inputs
(list font-liberation
+ git
texlive-acronym
texlive-adjustbox
texlive-biblatex
@@ -85,6 +76,7 @@
texlive-chngcntr
texlive-circuitikz
texlive-collection-langcyrillic
+ texlive-fancyvrb
texlive-fontspec
texlive-glossaries
texlive-glossaries-english
@@ -101,16 +93,33 @@
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
+ #:modules (append %default-gnu-imported-modules
+ '((ice-9 regex)
+ (srfi srfi-1)))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'configure-environment
+ (lambda* (#:key inputs make-flags parallel-build?
+ #:allow-other-keys)
+ (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/")))
+ (install-file "sparc.pdf" doc-dir)))))))
(home-page "https://github.com/artyom-poptsov/SPARC")
(synopsis "Book on combining art and technology")
(description