[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62324] gnu: Add emu8051
From: |
Bruno Victal |
Subject: |
[bug#62324] gnu: Add emu8051 |
Date: |
Tue, 21 Mar 2023 13:43:14 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
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"))))
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")))))))
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