help-guix
[Top][All Lists]
Advanced

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

Re: trivial-build-system and which


From: Oleg Pykhalov
Subject: Re: trivial-build-system and which
Date: Wed, 18 Nov 2020 08:44:15 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hello,

Stephen Scheck <singularsyntax@gmail.com> writes:

> This package definition always fails with #f returned by `(which "bash")`
> ... am I missing something?
>
>     (build-system trivial-build-system)
>     (arguments
>       `(#:builder
>          (begin
>            (use-modules (guix build utils))
>            (invoke "make" (string-append "SHELL=" (which "bash")) "..."))))
>     (native-inputs
>       `(("bash" ,bash)
>         ("make" ,gnu-make)

Inputs don't add themselves to the PATH environment variable, which is
required for invoke in this case.  So you want to do something like:

  (setenv "PATH"
    (string-append
     (assoc-ref %build-inputs "bash") "/bin" ":"
     (getenv "PATH")))

Or you could just invoke in another way:

  (invoke "make" (string-append "SHELL=" (assoc-ref %build-inputs "bash") 
"/bin/bash") "...")


Oleg.

Attachment: signature.asc
Description: PGP signature


reply via email to

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