unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: phodina via <help-guix@gnu.org>
To: help-guix <help-guix@gnu.org>
Subject: HELP: Apply local patch in phase
Date: Wed, 28 Dec 2022 01:48:00 +0000	[thread overview]
Message-ID: <CGUqYiCfbeyX7I6LDCeAK9zXb4x4ToQ_ewucjZhUJjTr-SBIQT6v6DqWFxSYgaxc_k88qsJM-AEDWPJeKGTwlUvH9hnti1wCV2M1c31dpgs=@protonmail.com> (raw)

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

             reply	other threads:[~2022-12-28  1:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28  1:48 phodina via [this message]
2022-12-28  7:21 ` HELP: Apply local patch in phase Wojtek Kosior via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CGUqYiCfbeyX7I6LDCeAK9zXb4x4ToQ_ewucjZhUJjTr-SBIQT6v6DqWFxSYgaxc_k88qsJM-AEDWPJeKGTwlUvH9hnti1wCV2M1c31dpgs=@protonmail.com' \
    --to=help-guix@gnu.org \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).