diff mbox series

[bug#37409] gnu: guile-email: Add phase to patch the module directory.

Message ID 20190915123331.22860-1-mail@cbaines.net
State Accepted
Headers show
Series [bug#37409] gnu: guile-email: Add phase to patch the module directory. | expand

Commit Message

Christopher Baines Sept. 15, 2019, 12:33 p.m. UTC
Otherwise the .go files appear within share, and Guile doesn't find them. With
this patch they appear in lib within the output. One thing this means is that
stack traces include the filenames.

* gnu/packages/guile-xyz.scm (guile-email)[arguments]: Add 'patch-module-dir
phase.
---
 gnu/packages/guile-xyz.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès Sept. 16, 2019, 7:56 a.m. UTC | #1
Hello,

Christopher Baines <mail@cbaines.net> skribis:

> Otherwise the .go files appear within share, and Guile doesn't find them. With
> this patch they appear in lib within the output. One thing this means is that
> stack traces include the filenames.
>
> * gnu/packages/guile-xyz.scm (guile-email)[arguments]: Add 'patch-module-dir
> phase.

LGTM!

Ludo’.
Arun Isaac Sept. 16, 2019, 8:37 a.m. UTC | #2
> Otherwise the .go files appear within share, and Guile doesn't find them. With
> this patch they appear in lib within the output. One thing this means is that
> stack traces include the filenames.

LGTM! I'll also make this modification to guile-email upstream so this
phase won't be necessary after the next update of guile-email.
Christopher Baines Sept. 21, 2019, 4:37 p.m. UTC | #3
Ludovic Courtès <ludo@gnu.org> writes:

> Hello,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> Otherwise the .go files appear within share, and Guile doesn't find them. With
>> this patch they appear in lib within the output. One thing this means is that
>> stack traces include the filenames.
>>
>> * gnu/packages/guile-xyz.scm (guile-email)[arguments]: Add 'patch-module-dir
>> phase.
>
> LGTM!

Great, I've pushed this now (as
c219104c7803cd31ab1cf4bef142a8fbf8ed5b7a).
Christopher Baines Sept. 21, 2019, 4:37 p.m. UTC | #4
Arun Isaac <arunisaac@systemreboot.net> writes:

>> Otherwise the .go files appear within share, and Guile doesn't find them. With
>> this patch they appear in lib within the output. One thing this means is that
>> stack traces include the filenames.
>
> LGTM! I'll also make this modification to guile-email upstream so this
> phase won't be necessary after the next update of guile-email.

Awesome, thanks Arun :)
diff mbox series

Patch

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index b765ef36e1..4fa2759205 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -927,7 +927,16 @@  tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
     (inputs
      `(("guile" ,guile-2.2)))
     (arguments
-     '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
+     '(#:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-module-dir
+           (lambda _
+             (substitute* "Makefile.in"
+               (("^godir = ([[:graph:]]+)")
+                "godir = \
+$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
+             #t)))))
     (home-page "https://guile-email.systemreboot.net")
     (synopsis "Guile email parser")
     (description "guile-email is a collection of email utilities implemented