gnu: chez-nanopass: Fix failed document build.

Fixes guix/guix#890.

* gnu/packages/chez.scm (chez-nanopass)[arguments]<#:phases>: Add new
phase 'fix-user-guide-date', pin the date of PDF document to the release
date.
In phase 'build-doc', set environment 'XDG_CACHE_HOME' before invoking
'make'.

Change-Id: I91e5f5efd08c3f5d2d94fbc9754f922df492a9ef
This commit is contained in:
Zhu Zihao 2025-07-06 10:48:51 +08:00 committed by Sharlatan Hellseher
parent 82553b3cca
commit 50b7528588
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -6,6 +6,7 @@
;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2021-2025 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
;;; Copyright © 2025 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -889,6 +890,12 @@ create compilers, making them easier to understand and maintain.")
,@#$base-plan))
((#:phases base-phases #~%standard-phases)
#~(modify-phases #$base-phases
(add-after 'unpack 'fix-user-guide-date
(lambda _
;; Release date: Oct 18, 2020
(substitute* "doc/user-guide.stex"
(("^\\\\author.*$" all)
(string-append all "\n" "\\date{October 18, 2020}")))))
(add-before 'install 'compile-and-test
(lambda args
(invoke "scheme"
@ -897,6 +904,9 @@ create compilers, making them easier to understand and maintain.")
(add-after 'compile-and-test 'build-doc
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(with-directory-excursion "doc"
;; Texlive-libkpathsea attempts to create directory at
;; '$XDG_CACHE_HOME/.texliveYYYY'.
(setenv "XDG_CACHE_HOME" "/tmp")
(invoke "make"
(string-append "Scheme="
(search-input-file