guix-patches
[Top][All Lists]
Advanced

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

[bug#62324] gnu: Add emu8051


From: c4droid
Subject: [bug#62324] gnu: Add emu8051
Date: Wed, 22 Mar 2023 09:48:47 +0800
User-agent: mu4e 1.8.13; emacs 28.2

Hi, Bruno

Bruno Victal <mirai@makinata.eu> writes:

> Hi,
>
> On 2023-03-21 07:20, c4droid wrote:
>> 
>> +      (arguments
>> +       `(#:tests? #f ;No test suite
>> +         #:make-flags (list (string-append "CC="
>> +                                           ,(cc-for-target)))
>> +         #:phases (modify-phases %standard-phases
>> +                    (delete 'configure) ;No ./configure script
>> +                    (add-before 'build 'patch-ncurses
>> +                      ;; Replace LDFLAGS -lcurses to -lncurses
>> +                      (lambda* _
>> +                        (substitute* "Makefile"
>> +                          (("-lcurses")
>> +                           "-lncurses"))))
>

The modules and snippet field can be apply to build derivation

> How about turning this 'patch-ncurses phase into a patch snippet instead? i.e.
>
> (source
>   (origin
>     (method ...)
>     ...
>     (modules '((guix build utils)))
>     (snippet
>      #~(begin
>         ;; Replace LDFLAGS -lcurses to -lncurses
>         (substitute* "Makefile"
>           (("-lcurses") "-lncurses"))))))
>
> [...]
>
>> +                    (replace 'install
>> +                      ;; No installation procedure
>> +                      (lambda _
>> +                        (install-file "emu"
>> +                                      (string-append (assoc-ref %outputs 
>> "out")
>> +                                                     "/bin")))))))
>

But here, I used G-Expressions here, report gexp is unbound variable.

> Use G-Expressions here, i.e.
>
> (arguments
>  (list
>   #:tests? #f ;No test suite
>   #:make-flags #~(list ...)
>   #:phases
>   #~(modify-phases ...
>      ...
>      (replace 'install
>        (lambda _
>         (install-file "emu" (string-append #$output "/bin")))))))
>
>
> Cheers,
> Bruno






reply via email to

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