Joseph,

LaFreniere, Joseph 写道:
I am working on the attached patch to package https://github.com/akermu/emacs-libvterm.git.

Thanks!

When building the package I get the following error:

building /gnu/store/89icdpwha5vvqmn2yn3949w503ck6cq6-emacs-vterm-0-1.de63115.tar.xz.drv...
File vterm-module-make.el is read-only; trying to patch anyway
patching file vterm-module-make.el
File vterm.el is read-only; trying to patch anyway
patching file vterm.el
Hunk #1 FAILED at 45.
1 out of 1 hunk FAILED -- saving rejects to file vterm.el.rej

I have looked at several other packages and the call I'm making to `make-file-writable` _looks_ to be correct.

Indeed.

But that function is either not called before the patch is applied

Also correct.

The source origin is built as a completely separate derivation, before Guix even starts to build your package, and long before your package's phases are called.

Snippets are (vaguely) like phases for your source derivation. This might work:

 (source …
   (modules '((guix build utils)))
   (snippet
    '(begin
      (for-each make-file-writable (find-files "."))
      #t)))

But… I don't have access to Guix at the moment and am not positively certain in which order the snippet and patches field are applied. Try it and let me know.

Kind regards,

T G-R

Attachment: signature.asc
Description: PGP signature

Reply via email to