From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Geerinckx-Rice Subject: Re: File is read-only; trying to patch anyway Date: Sat, 11 Jan 2020 21:20:16 +0100 Message-ID: <87o8v9rbin.fsf@nckx> References: <87wo9y6d51.fsf@lafreniere.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:41428) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqNFD-0001YJ-3e for help-guix@gnu.org; Sat, 11 Jan 2020 15:20:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqNFB-0005r7-NM for help-guix@gnu.org; Sat, 11 Jan 2020 15:20:26 -0500 Received: from tobias.gr ([2001:470:7405::1]:36520) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iqNFB-0005js-8X for help-guix@gnu.org; Sat, 11 Jan 2020 15:20:25 -0500 In-reply-to: <87wo9y6d51.fsf@lafreniere.xyz> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org, "LaFreniere, Joseph" --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Joseph, LaFreniere, Joseph =E5=86=99=E9=81=93=EF=BC=9A > I am working on the attached patch to package=20 > https://github.com/akermu/emacs-libvterm.git. Thanks! > When building the package I get the following error: > >> building=20 >> /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=20 > to=20 > `make-file-writable` _looks_ to be correct. Indeed. > But that function is=20 > either not called before the patch is applied Also correct. The source origin is built as a completely separate derivation,=20 before Guix even starts to build your package, and long before=20 your package's phases are called. Snippets are (vaguely) like phases for your source derivation.=20 This might work: (source =E2=80=A6 (modules '((guix build utils))) (snippet '(begin (for-each make-file-writable (find-files ".")) #t))) But=E2=80=A6 I don't have access to Guix at the moment and am not=20 positively certain in which order the snippet and patches field=20 are applied. Try it and let me know. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl4aLgAACgkQ2Imw8BjF STyonQ/+J8mE12TNur+91KgxoKGPqOmny5qk9sTBOED/xur1DYKlrdyjKai367/e Sw7kDs44VCFzI+wqSgpdoBLFVuuKunAiZ74dYPe47Ec+il3wRJyNOKvzJxzD28Ma vcG2Mye1QztgoIr/EKr9f4Pw2GbLibZHbaGdH4vwbrQkgnzZpoqGvb39RBKv/c7a ut+LmggtJSL6Dmx0DK3Sh3QLlHjZkgPl/IarD0fDF8Hx94YJUag0LM0tYI9V1U2m bO/Ee81zWCjtSw7AhyDBfTh1ChMkFm1rQVLN08v2PqCDLtPVvwJcH6SRZ/RyVpJC yvAc6gcoJJetnkzQIy3TSshuRL4TT9M/VupFaKAwDXYV7hEgdqcIS6HTpWinKGli IVtFjEep7W8H0skib/KrqOUeJQmdH/f7lIPbejBov5Iz5Gb8Ue3hosIQw2S3ydNg bgnSxoFApnB+evWQpLfFabEufIiRs3MfGeEM06ZUhCbQMY6zRWCvkT7w6C01d7Ac xqXyAvtmWLtm54WbMsaJ2ZM510QklT40bV+n/hiRSNj5K+65EyCEF7RRq/HNCgUe krSDLpDDmaqMFCQ8qWAV9IsjuX4Ptw4H5QsZhtpZOdkP3JzlvuxPz4Eq5yTjnAla XHHOD9nepe0pQR6+z14j1z4bafZZ2/16SaNGyV5XtGlk7hP90y0= =ve5A -----END PGP SIGNATURE----- --=-=-=--