help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apply a patch to a given package definition


From: Ian Eure
Subject: Re: Apply a patch to a given package definition
Date: Tue, 20 Aug 2024 14:15:18 -0700
User-agent: mu4e 1.8.13; emacs 28.2

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 via email to

[Prev in Thread] Current Thread [Next in Thread]