Subject: [bug#28660] [PATCH] gnu: python-numpy: Give sh store location instead of setting $SHELL.

From: Christopher Baines <[email-masked]>
Date: Wed, 4 Oct 2017 08:49:44 +0100

On Wed, 04 Oct 2017 09:04:36 +0200 (CEST)
Thomas Danckaert <[email-masked]> wrote:

> From: Christopher Baines <[email-masked]>
> Subject: Re: [bug#28660] [PATCH] gnu: python-numpy: Give sh store 
> location instead of setting $SHELL.
> Date: Wed, 4 Oct 2017 07:30:48 +0100
> 
> > Could bash be specified as an input, and that used instead? This 
> > would
> > mean that the behaviour of the package is more isolated from the
> > environment.  
> 
> Sounds good, but I'm afraid I don't understand what you mean (maybe 
> it's still too early in the morning).  If we add a "bash" to the 
> package inputs, it will still come from the store.  So probably you 
> mean something else by “specified as an input”?
> 
> > For example, on non GuixSD systems, /bin/sh could be something other
> > than bash. But, if the numpy package depends on some bash in the 
> > store,
> > and uses that, then it would be isolated from this.  
> 
> That's true, though users on such systems could set $SHELL to 
> override the default one from the store.  But maybe avoiding having 
> to do that is what you mean by “more isolated from the environment”?
> 
> The shell is used for very limited purposes anyway (essentially to 
> run C and Fortran compilers to build extenstions, AFAIU), but I'm 
> happy to improve the patch if it's useful.  If you have a solution 
> that allows users to use their own /bin/sh if they want, but still 
> works for all builds of dependent packages on Guix, please explain :-)

Sorry Thomas, ignore what I originally said. I thought from reading the
patch that this was patching numpy to use /bin/sh . Now after building
it and looking at the resulting files, I can see that it makes the
default use bash from the store [1]. Which was exactly what I was
suggesting, but you were already doing that.

With this new, hopefully more correct interpretation, this patch looks
fine to me :)

1: 
sh = os.environ.get('SHELL', '/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/sh')