Danny Milosavljevic <dan...@scratchpost.org> skribis:

>> This note should go to the top of the .patch file, along with one or two
>> sentences explaining what it does and why we need it.
>
> OK, will do that.

Great.

>> In that case, I’d suggest writing a procedure like:
>> 
>>   (define (make-u-boot-package board)
>>     (package
>>       (inherit u-boot)
>>       (name (string-append "u-boot-" (string-downcase board)))
>>       (arguments
>>         ;; … pass the right configure flags etc.
>>         )))
>> 
>> Then it’s probably enough to export ‘u-boot’ and ‘make-u-boot’—having a
>> zillion variables doesn’t seem very helpful.  People can explicitly call
>> ‘make-u-boot’ with the right board name
>
> Yeah, sounds much nicer. 
>
> How do I test this? How can I call it?

For test purposes, you could define a package variant and try to build
it:

  (define-public u-boot-FOOBAR
    (make-u-boot "FOOBAR"))

and:

  guix build u-boot-foobar

HTH!

Ludo’.

Reply via email to