Hi Cristoph,

Christoph Buck <d...@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