* [PATCH] Hardcode “gs” path in Lilypond.
@ 2015-10-12 6:54 Ricardo Wurmus
2015-10-12 18:43 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2015-10-12 6:54 UTC (permalink / raw)
To: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 567 bytes --]
Hi Guix,
the attached patch changes the result of ‘(search-gs)’ in the Lilypond
backend, such that it returns the “gs” executable from the very same
version of ghostscript that Lilypond was built with.
Retaining a reference to ghostscript causes a closure increase from
309.9 to 351.2. “gs” is required at runtime in order to compile
Lilypond files to PDF (the default output format). Without “gs” only
the postscript file is generated and the compilation fails unless the
output format is explicitly set to something other than PDF.
~~ Ricardo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-lilypond-Hardcode-path-to-gs-executable.patch --]
[-- Type: text/x-patch, Size: 1800 bytes --]
From c98b44ba82e45ebcb802bc1852128624f647b580 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sun, 11 Oct 2015 11:24:20 +0200
Subject: [PATCH] gnu: lilypond: Hardcode path to "gs" executable.
* gnu/packages/music.scm (lilypond)[arguments]: Add build phase
"hardcode-path-to-gs".
---
gnu/packages/music.scm | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 8263b60..cb8d58d 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -310,14 +310,22 @@ you to define complex tempo maps for entire songs or performances.")
(assoc-ref %build-inputs "font-tex-gyre")
"/share/fonts/opentype/"))
#:phases
- (alist-cons-before
- 'configure 'prepare-configuration
- (lambda _
- (substitute* "configure"
- (("SHELL=/bin/sh") "SHELL=sh"))
- (setenv "out" "")
- #t)
- %standard-phases)))
+ (modify-phases %standard-phases
+ (add-after 'unpack 'hardcode-path-to-gs
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "scm/backend-library.scm"
+ (("\\(search-executable '\\(\"gs\"\\)\\)")
+ (string-append "\""
+ (assoc-ref inputs "ghostscript")
+ "/bin/gs"
+ "\"" )))
+ #t))
+ (add-before 'configure 'prepare-configuration
+ (lambda _
+ (substitute* "configure"
+ (("SHELL=/bin/sh") "SHELL=sh"))
+ (setenv "out" "")
+ #t)))))
(inputs
`(("guile" ,guile-1.8)
("font-dejavu" ,font-dejavu)
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Hardcode “gs” path in Lilypond.
2015-10-12 6:54 [PATCH] Hardcode “gs” path in Lilypond Ricardo Wurmus
@ 2015-10-12 18:43 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-10-12 18:43 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel@gnu.org
Ricardo Wurmus <rekado@elephly.net> skribis:
> the attached patch changes the result of ‘(search-gs)’ in the Lilypond
> backend, such that it returns the “gs” executable from the very same
> version of ghostscript that Lilypond was built with.
>
> Retaining a reference to ghostscript causes a closure increase from
> 309.9 to 351.2. “gs” is required at runtime in order to compile
> Lilypond files to PDF (the default output format). Without “gs” only
> the postscript file is generated and the compilation fails unless the
> output format is explicitly set to something other than PDF.
Makes sense.
> From c98b44ba82e45ebcb802bc1852128624f647b580 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Sun, 11 Oct 2015 11:24:20 +0200
> Subject: [PATCH] gnu: lilypond: Hardcode path to "gs" executable.
>
> * gnu/packages/music.scm (lilypond)[arguments]: Add build phase
> "hardcode-path-to-gs".
OK!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-12 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-12 6:54 [PATCH] Hardcode “gs” path in Lilypond Ricardo Wurmus
2015-10-12 18:43 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.