unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* HELP: Apply local patch in phase
@ 2022-12-28  1:48 phodina via
  2022-12-28  7:21 ` Wojtek Kosior via
  0 siblings, 1 reply; 2+ messages in thread
From: phodina via @ 2022-12-28  1:48 UTC (permalink / raw)
  To: help-guix

Hello,

could you please suggest how to apply local patch using gexp?

The reason the patch is not applied to source is that it patches code from submodule which is downloaded after unpack phase finishes.

There's nice example in the file 'gnu/packages/games.scm'

Here we list the patch as dependency:
```
(native-inputs
`(("unzip" ,unzip)
("patch" ,patch) ("love-11.patch" ,(search-patch "mrrescue-support-love-11.patch"))))
```
Here's transformation to inputs without labels for my case:
```
(native-inputs
`(("unzip" ,unzip)
("patch" ,patch) ("love-11.patch" ,(search-patch "mrrescue-support-love-11.patch"))))
```
And later we apply the patch:
```
(invoke patch "-p1" "-i"
(assoc-ref %build-inputs "love-11.patch")))
```
The issue here is when I attempt to do so with following code the expression returns #f as the patch is not found:
```
(invoke (search-input-file inputs "/bin/patch") "-p1" "-i" (search-input-file inputs "zenlib_dynamic_physfs.diff"))
```

Any ideas what to change?

----
Petr

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-28  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-28  1:48 HELP: Apply local patch in phase phodina via
2022-12-28  7:21 ` Wojtek Kosior via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).