[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive
From: |
Ricardo Wurmus |
Subject: |
bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union. |
Date: |
Mon, 6 Dec 2021 18:30:53 +0100 |
* gnu/packages/python-xyz.scm (python-nbconvert)[inputs]: Add texlive-bin.
[arguments]: Embed reference to xelatex and bibtex from the texlive-bin, not
the texlive-union.
---
gnu/packages/python-xyz.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 81b99e1d2e..602833c4f4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12117,14 +12117,15 @@ (define-public python-nbconvert
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths-and-tests
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
;; Use pandoc binary from input.
(substitute* "nbconvert/utils/pandoc.py"
(("'pandoc'") (string-append "'" (which "pandoc") "'")))
;; Same for LaTeX.
- (substitute* "nbconvert/exporters/pdf.py"
- (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
- (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
+ (let ((texlive (assoc-ref inputs "texlive-bin")))
+ (substitute* "nbconvert/exporters/pdf.py"
+ (("\"xelatex\"") (string-append "\"" texlive
"/bin/xelatex\""))
+ (("\"bibtex\"") (string-append "\"" texlive
"/bin/bibtex\""))))
;; Make sure tests are not skipped.
(substitute* (find-files "." "test_.+\\.py$")
(("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
@@ -12158,6 +12159,7 @@ (define-public python-nbconvert
(invoke "pytest" "-vv")))))))
(inputs
`(("pandoc" ,pandoc)
+ ("texlive-bin" ,texlive-bin)
;; XXX: Disabled, needs substitute*.
;;("inkscape" ,inkscape)
))
--
2.34.0