all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ian Eure <ian@retrospec.tv>
To: Christoph Buck <dev@icepic.de>
Cc: help-guix@gnu.org
Subject: Re: Apply a patch to a given package definition
Date: Tue, 20 Aug 2024 14:15:18 -0700	[thread overview]
Message-ID: <87a5h6520b.fsf@meson> (raw)
In-Reply-To: <87ed6jy2pj.fsf@icepic.de>

Hi Cristoph,

Christoph Buck <dev@icepic.de> writes:

> Hi Ian!
>
>> You can have your source inherit from the original package’s, 
>> but with
>> modifications -- just like the package itself.  This might not 
>> be
>> exaxtly right, but should give you the right idea:
>>
>>    (define-public u-boot-new-cool-board-arm
>>      (package
>>        (inherit ub)
>>        (version "2024.01")
>>        (source
>>         (origin
>>           (inherit (package-source ub))
>>           (patches (append (origin-patches (package-source ub))
>>                            '("0001-Add-board-description-for-new-cool-board.patch")))))))
>>
>> Any fields you don’t want to modify will be inherited, so you 
>> may be
>> able to eliminate the version field as well.
>
> Oh i didn't know i can use inherit for all all (?) record 
> types. On
> hindsight it is pretty obvious. Thanks! Your solution works 
> perfect!
>

Yes, it’s very handy.  I’m glad my suggestion was helpful.

>
> By chance, do you know if a transformation would also work and 
> if so,
> how?
>

I’ve never messed with package transformations, so I don’t know.

Thanks,

  — Ian


  reply	other threads:[~2024-08-20 21:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19  8:19 Apply a patch to a given package definition Christoph Buck
2024-08-19 23:02 ` Ian Eure
2024-08-20  9:15   ` Christoph Buck
2024-08-20 21:15     ` Ian Eure [this message]
2024-08-27 14:19     ` Simon Tournier

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

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

  git send-email \
    --in-reply-to=87a5h6520b.fsf@meson \
    --to=ian@retrospec.tv \
    --cc=dev@icepic.de \
    --cc=help-guix@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.