all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: Stephen Scheck <singularsyntax@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: trivial-build-system and which
Date: Wed, 18 Nov 2020 08:44:15 +0300	[thread overview]
Message-ID: <874klnkymo.fsf@gmail.com> (raw)
In-Reply-To: <CAKjnHz3yZnDqny_9WD2svvVzZ9pAue=Jaf59vERE42fNU9iz6w@mail.gmail.com> (Stephen Scheck's message of "Tue, 17 Nov 2020 19:42:33 -0500")

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

      reply	other threads:[~2020-11-18  5:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18  0:42 trivial-build-system and which Stephen Scheck
2020-11-18  5:44 ` Oleg Pykhalov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874klnkymo.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=singularsyntax@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.