* Dealing with environment settings on a non-Guix distribution
@ 2017-02-10 9:01 Pjotr Prins
2017-02-10 9:37 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: Pjotr Prins @ 2017-02-10 9:01 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
Dear Ricardo,
@FOSDEM one thing came up that we ought to make it easier to handle
environment settings (shell variables). Yesterday, I had to help
somenone use R and install some packages in $HOME. This proved quite
hairy. Mostly because we needed to tell R about certificates in
/etc/ssl, change the native download from curl to wget, and to tell R
about library paths for dependencies on openssl, for example. Not
something you'd like a non-guixer try to figure out.
For Ruby I created a script in
https://github.com/pjotrp/guix-notes/blob/master/scripts/ruby-guix-env
(actually it is out of date, I also deal with certificates).
I think we can have more of these 'environment' managing scripts. Can
we somehow get them into Guix? Maybe create a separate package for
each of them - say ruby-guix-env and r-guix-env? It would help
bootstrap people using Guix for R, ruby and other languages.
Pj.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Dealing with environment settings on a non-Guix distribution
2017-02-10 9:01 Dealing with environment settings on a non-Guix distribution Pjotr Prins
@ 2017-02-10 9:37 ` Ricardo Wurmus
2017-02-10 10:07 ` Pjotr Prins
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2017-02-10 9:37 UTC (permalink / raw)
To: Pjotr Prins; +Cc: guix-devel
Hi Pjotr,
> @FOSDEM one thing came up that we ought to make it easier to handle
> environment settings (shell variables). Yesterday, I had to help
> somenone use R and install some packages in $HOME. This proved quite
> hairy. Mostly because we needed to tell R about certificates in
> /etc/ssl, change the native download from curl to wget, and to tell R
> about library paths for dependencies on openssl, for example. Not
> something you'd like a non-guixer try to figure out.
Yes, this is something that need simplification. The most common
settings required are
* GUIX_LOCPATH
depends on “glibc-locales” or “glibc-utf8-locales”
* GIT_SSL_CAINFO, SSL_CERT_FILE, SSL_CERT_DIR
depend on “nss-certs” or a system-wide cert store
On foreign distros it would be nice to handle these things
semi-automatically. Installing “glibc-locales” does not automatically
set GUIX_LOCPATH; nor do GIT_SSL_CAINFO, SSL_CERT_FILE, and SSL_CERT_DIR
get set when installing “nss-certs”. These are the only things I can
think of right now that need to be set manually at the MDC. Pretty much
everything else is handled by “source $GUIX_PROFILE/etc/profile” (which
we do in a global shell initialisation file).
I never had to make R switch from curl to wget or to tell it about
additional library paths. Could you elaborate on why this is needed in
your case? Is there a problem we should fix in our R package?
> For Ruby I created a script in
>
> https://github.com/pjotrp/guix-notes/blob/master/scripts/ruby-guix-env
>
> (actually it is out of date, I also deal with certificates).
>
> I think we can have more of these 'environment' managing scripts. Can
> we somehow get them into Guix? Maybe create a separate package for
> each of them - say ruby-guix-env and r-guix-env? It would help
> bootstrap people using Guix for R, ruby and other languages.
If we go down this road of offering environment files I’d rather have
something generic. Ideally, our packages would *just work* after
setting common environment variables, such as those mentioned above.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Dealing with environment settings on a non-Guix distribution
2017-02-10 9:37 ` Ricardo Wurmus
@ 2017-02-10 10:07 ` Pjotr Prins
0 siblings, 0 replies; 3+ messages in thread
From: Pjotr Prins @ 2017-02-10 10:07 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
On Fri, Feb 10, 2017 at 10:37:03AM +0100, Ricardo Wurmus wrote:
> Yes, this is something that need simplification. The most common
> settings required are
>
> * GUIX_LOCPATH
> depends on “glibc-locales” or “glibc-utf8-locales”
> * GIT_SSL_CAINFO, SSL_CERT_FILE, SSL_CERT_DIR
> depend on “nss-certs” or a system-wide cert store
Indeed.
> On foreign distros it would be nice to handle these things
> semi-automatically. Installing “glibc-locales” does not automatically
> set GUIX_LOCPATH; nor do GIT_SSL_CAINFO, SSL_CERT_FILE, and SSL_CERT_DIR
> get set when installing “nss-certs”. These are the only things I can
> think of right now that need to be set manually at the MDC. Pretty much
> everything else is handled by “source $GUIX_PROFILE/etc/profile” (which
> we do in a global shell initialisation file).
>
> I never had to make R switch from curl to wget or to tell it about
> additional library paths. Could you elaborate on why this is needed in
> your case? Is there a problem we should fix in our R package?
It was an older version of Guix (R 3.3.0), so maybe it works now. It
did not come with proper support that handled CRAN and git so we
'bootstrapped' with wget. I wrote it up:
https://github.com/pjotrp/guix-notes/blob/1d6548383445bebf64aab6f406f41df6f514afc3/R.org#dealing-with-certificates-and-shared-libraries
>
> > For Ruby I created a script in
> >
> > https://github.com/pjotrp/guix-notes/blob/master/scripts/ruby-guix-env
> >
> > (actually it is out of date, I also deal with certificates).
> >
> > I think we can have more of these 'environment' managing scripts. Can
> > we somehow get them into Guix? Maybe create a separate package for
> > each of them - say ruby-guix-env and r-guix-env? It would help
> > bootstrap people using Guix for R, ruby and other languages.
>
> If we go down this road of offering environment files I’d rather have
> something generic. Ideally, our packages would *just work* after
> setting common environment variables, such as those mentioned above.
Yes. But it would be separate from GuixSD. What would be a good place
to run, say, R from.
Pj.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-10 10:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-10 9:01 Dealing with environment settings on a non-Guix distribution Pjotr Prins
2017-02-10 9:37 ` Ricardo Wurmus
2017-02-10 10:07 ` Pjotr Prins
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).