* bug#52333: [PATCH] Remove extraneous references
@ 2021-12-06 16:56 Ricardo Wurmus
2021-12-06 17:30 ` bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union Ricardo Wurmus
2021-12-15 12:53 ` bug#52333: [PATCH] Remove extraneous references Ricardo Wurmus
0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2021-12-06 16:56 UTC (permalink / raw)
To: 52333
Hi Guix,
r-minimal keeps a record of build time inputs in a comment and in a
libtool script. I don’t know if I may remove them all, but some of them
seem to safe to remove, so that’s what the first patch does.
While I removed texlive-union references from r-minimal, I noticed that
python-nbconvert also does something undesirable: it retains references
to xelatex and bibtex, but takes these from the texlive-union of the
native-inputs. That seems like a mistake, so I added a regular
texlive-bin input and embedded a reference to *that* instead of the
texlive-union-wrapped scripts.
--
Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union.
2021-12-06 16:56 bug#52333: [PATCH] Remove extraneous references Ricardo Wurmus
@ 2021-12-06 17:30 ` Ricardo Wurmus
2021-12-06 17:30 ` bug#52333: [PATCH 2/2] gnu: r-minimal: Remove extraneous references Ricardo Wurmus
2021-12-06 23:03 ` bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union Ricardo Wurmus
2021-12-15 12:53 ` bug#52333: [PATCH] Remove extraneous references Ricardo Wurmus
1 sibling, 2 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2021-12-06 17:30 UTC (permalink / raw)
To: 52333; +Cc: Ricardo Wurmus
* 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#52333: [PATCH 2/2] gnu: r-minimal: Remove extraneous references.
2021-12-06 17:30 ` bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union Ricardo Wurmus
@ 2021-12-06 17:30 ` Ricardo Wurmus
2021-12-06 23:03 ` bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union Ricardo Wurmus
1 sibling, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2021-12-06 17:30 UTC (permalink / raw)
To: 52333; +Cc: Ricardo Wurmus
* gnu/packages/statistics.scm (r-minimal)[arguments]: Remove references to
native build-time tools.
---
gnu/packages/statistics.scm | 39 ++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index cf7a64ec7a..599d6a8fc3 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -403,12 +403,49 @@ (define-public r-minimal
(arguments
`(#:tests? #f
,@(substitute-keyword-arguments (package-arguments r-with-tests)
+ ((#:disallowed-references refs '())
+ (cons perl refs))
((#:configure-flags flags)
;; Do not build the recommended packages. The build system creates
;; random temporary directories and embeds their names in some
;; package files. We build these packages with the r-build-system
;; instead.
- `(cons "--without-recommended-packages" ,flags)))))))
+ `(cons "--without-recommended-packages" ,flags))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'install 'remove-extraneous-references
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (string-append out "/lib/R/etc/Makeconf")
+ (("^# configure.*")
+ "# Removed to avoid extraneous references\n"))
+ (substitute* (string-append out "/lib/R/bin/libtool")
+ (((string-append
+ "(-L)?("
+ (assoc-ref inputs "bzip2")
+ "|"
+ (assoc-ref inputs "perl")
+ "|"
+ (assoc-ref inputs "texlive")
+ "|"
+ (assoc-ref inputs "texlive-bin")
+ "|"
+ (assoc-ref inputs "texinfo")
+ "|"
+ (assoc-ref inputs "xz")
+ "|"
+ (format #false
+ "/gnu/store/[^-]+-(~{~a~^|~})-[^/]+"
+ '("glibc-utf8-locales"
+ "libselinux"
+ "libsepol"
+ "file"
+ "texlive-bin"
+ "util-macros"
+ "graphite2"))
+ "|"
+ "/gnu/store/[^-]+-glibc-[^-]+-static"
+ ")/lib")) ""))))))))))))
(define-public rmath-standalone
(package (inherit r-minimal)
--
2.34.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union.
2021-12-06 17:30 ` bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union Ricardo Wurmus
2021-12-06 17:30 ` bug#52333: [PATCH 2/2] gnu: r-minimal: Remove extraneous references Ricardo Wurmus
@ 2021-12-06 23:03 ` Ricardo Wurmus
1 sibling, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2021-12-06 23:03 UTC (permalink / raw)
To: 52333
Ricardo Wurmus <rekado@elephly.net> writes:
> * 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.
This is a bad idea, because it breaks PDF conversion.
I still think that the texlive stuff should be a regular input, not a
native input, but however we do this: it’s not with this patch.
--
Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#52333: [PATCH] Remove extraneous references
2021-12-06 16:56 bug#52333: [PATCH] Remove extraneous references Ricardo Wurmus
2021-12-06 17:30 ` bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union Ricardo Wurmus
@ 2021-12-15 12:53 ` Ricardo Wurmus
1 sibling, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2021-12-15 12:53 UTC (permalink / raw)
To: 52333-done
I applied the change to r-minimal and discarded the other one.
--
Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-15 13:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 16:56 bug#52333: [PATCH] Remove extraneous references Ricardo Wurmus
2021-12-06 17:30 ` bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union Ricardo Wurmus
2021-12-06 17:30 ` bug#52333: [PATCH 2/2] gnu: r-minimal: Remove extraneous references Ricardo Wurmus
2021-12-06 23:03 ` bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union Ricardo Wurmus
2021-12-15 12:53 ` bug#52333: [PATCH] Remove extraneous references Ricardo Wurmus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).