help-guix
[Top][All Lists]
Advanced

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

Re: How to replace %output with #$output?


From: Mekeor Melire
Subject: Re: How to replace %output with #$output?
Date: Tue, 22 Mar 2022 07:26:38 +0000

2022-03-21 / 21:57 / me@tobias.gr:

> Remove the quote after arguments (replace it with a plain LIST call) and add 
> #~ before (modify-phases ...) to define a gexp.
>
> Untested example:
>
>     (arguments
>       (list #:tests? #f ; no tests
>              #:make-flags (list "CC=gcc")
>              #:phases
>              #~(modify-phases %standard-phases
>                  (delete 'configure)
>                  (add-after 'unpack 'patch-makefile
>                    (lambda _
>                      (substitute* "Makefile"
>                        (("/usr/local")
>                         #$output)))))))

With these changes I get this error:

        Wrong type to apply: "CC=gcc"

> So does hard-coding 'gcc' over using (cc-for-target).

Yes, I would also prefer to use cc-for-target. But I wanted to simplify
my code first. Because in order to use cc-for-target, I have to use
backticks. If you have a suggestion for how to use both cc-for-target
and #$output, let me know.

> Very strong opinions on Scheme coding style, that boy.

Please don't assume gender. But yes, you can refer to me with the "he"
pronoun.



reply via email to

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