unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: divoplade <d@divoplade.fr>
To: help-guix@gnu.org
Subject: Wrapping an R script: how do I compose the R_LIBS_SITE environment variable?
Date: Fri, 05 Feb 2021 17:14:17 +0100	[thread overview]
Message-ID: <57572613456b4704f097480b687fef4e8944cf68.camel@divoplade.fr> (raw)

Dear guix,

I am using guix to write R packages. For convenience, I created a small
R script that does the job.

To make this script work as-is, I wrapped it using wrap-program. wrap-
program creates a shell script that sets up environment variables and
then call the real script, because R needs to be able to find all the
packages and dependencies. More specifically, I need to extend the
R_LIBS_SITE environment variable to point to all the R dependencies of
my package, as well as their recursive dependencies.

How do I compute that? I only care about R dependencies, so using the
whole recursive dependency tree of my package seems too much.

My current solution is to save the R_LIBS_SITE environment from the
build procedure and just use that. The obvious problem is that it also
contains build dependencies, and I don't think it will work correctly
for cross-compiled packages.

Do you have a better idea?

Best regards,

divoplade



             reply	other threads:[~2021-02-05 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 16:14 divoplade [this message]
2021-02-06 13:53 ` Wrapping an R script: how do I compose the R_LIBS_SITE environment variable? zimoun
2021-02-06 15:28   ` Ricardo Wurmus
2021-02-07  0:24     ` divoplade
2021-02-07  7:11       ` Ricardo Wurmus
2021-02-07  9:30         ` divoplade
2021-02-07 15:03           ` zimoun

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=57572613456b4704f097480b687fef4e8944cf68.camel@divoplade.fr \
    --to=d@divoplade.fr \
    --cc=help-guix@gnu.org \
    /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.
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).