Hi, 

On May 5, 2025 4:35:16 PM GMT+02:00, Marc Coquand <marc@mccd.space> wrote:
>Hey!
>
>I'm trying to setup a very simple patch to aerc to remove a check that doesn't 
>work with guix.
>
>(define-public aerc-patched
>  (package
>   (inherit aerc)
>   (name "aerc-patched")
>   (source (origin
>            (inherit (package-source aerc))
>            (patches 
> '("guix-packages/001-aerc-remove-transactions-requirement.patch"))))))
>
>
>However, it's not applying, and failing with
>
>source is at 'aerc-0.20.1-checkout'
>applying 
>'/gnu/store/pdza47p14iblr7x73lri6y3kvn6r15yv-001-aerc-remove-transactions-requirement.patch'...
>File config/accounts.go is read-only; trying to patch anyway
>patching file config/accounts.go
>Hunk #1 FAILED at 364.
>1 out of 1 hunk FAILED -- saving rejects to file config/accounts.go.rej
>
>
>It seems that the patch doesn't apply because the file is read-only. I am not 
>sure what I am doing wrong.

I dont think so. Seems that the hunk doesn't apply cleanly. So you will have to 
adapt your patch. You can use --keep-failed to keep the source in /tmp when it 
fails. Then make a new patch / adapt this one until it apples with patch 
command. 

Regards
Rutherther 

Reply via email to