unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* trivial-build-system and which
@ 2020-11-18  0:42 Stephen Scheck
  2020-11-18  5:44 ` Oleg Pykhalov
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Scheck @ 2020-11-18  0:42 UTC (permalink / raw)
  To: help-guix

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: trivial-build-system and which
  2020-11-18  0:42 trivial-build-system and which Stephen Scheck
@ 2020-11-18  5:44 ` Oleg Pykhalov
  0 siblings, 0 replies; 2+ messages in thread
From: Oleg Pykhalov @ 2020-11-18  5:44 UTC (permalink / raw)
  To: Stephen Scheck; +Cc: help-guix

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-18  5:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18  0:42 trivial-build-system and which Stephen Scheck
2020-11-18  5:44 ` Oleg Pykhalov

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git