From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yMR7Hz2gHmC0NQAA0tVLHw (envelope-from ) for ; Sat, 06 Feb 2021 13:57:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4HgiGz2gHmAAXgAAbx9fmQ (envelope-from ) for ; Sat, 06 Feb 2021 13:57:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E0304940250 for ; Sat, 6 Feb 2021 13:57:16 +0000 (UTC) Received: from localhost ([::1]:41472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8O5L-0001x0-UK for larch@yhetil.org; Sat, 06 Feb 2021 08:57:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8O5B-0001we-MN for help-guix@gnu.org; Sat, 06 Feb 2021 08:57:05 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:42627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8O57-00051r-Fo for help-guix@gnu.org; Sat, 06 Feb 2021 08:57:05 -0500 Received: by mail-wr1-x42e.google.com with SMTP id r7so1454963wrq.9 for ; Sat, 06 Feb 2021 05:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=fND+BsN+Zyl3o+wsa48/oaPltfM9yWoYVNafKZAKuDs=; b=kGGOjU/HJYUQpju0ZZNPECtmMISxZKRrNiPEB/udkye2XH/q4m0e9XhZXp1kIG9uYb CW+9WSDHzEMxgTDIedm7iWdbvNy9kjLdvNG2wMdBwiOfW6Cw/bMYczeVmC8lCfo149v1 bgG8lQbTs05shPrJ63njnAwXZiwRBis4O4vDG9YzL+IzIvNXGeUIXhvYuU0ryeGjJsdC IxnOljZtqhhSN4K/ZPu0VMjkpjCXGXY/JYKHRgeCFZygomWCauIqVnAzKw4TWj1TJpPo vkBi3G90wkXPmgsVNl/B4c+tyvC4BZNU+D38Fky4RM9+ocIgqfjgrT2U/4Y0p+yOGtB+ kUvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=fND+BsN+Zyl3o+wsa48/oaPltfM9yWoYVNafKZAKuDs=; b=Wzb4nrxuvIvPFxU2noEMpqbEa7lZuOxPuRw7g3KMTNNcTQGts0rZoAxlmsSkycJRcV CYJOhOQBlsLQLlZZE4Z74B2fnm31DRblqTUUt+ALKO1mSog82avf7H+U97mFRYQxaTIL nQ9R4KodeJZ7oiJDjmx08huhOVnztuF/pD9g5Sp4A27lht/40Q8FzmoDvsnFXHAFquuW AhDqHE0Jno47SpSmECvA2BQJH71TtTjckjfV+SAMMxSNuf2pjgRPFLq4Y/53E5Z4d+nn C9YdyDGEOPyD4XM9tGJABVa02okQpqVQIAVD9qQ6k/YeItj01nHV9Q4MVYPQdRhE2hBU r7xQ== X-Gm-Message-State: AOAM5313+xkV5cJuyOjHVzw++1t2CeGQAt+4NUzrD9xnMCU9hK6vB9Yz KmNCI3iQ1QHiowGoXp5XmFsJtXswicA= X-Google-Smtp-Source: ABdhPJz8ZNQjdjqzF2W2TYD8r5OmJ/Tga7N+EHkuRiqrVT6Qe21B+Iisun3GEUbmu7bNMamkHEolOw== X-Received: by 2002:a05:6000:1803:: with SMTP id m3mr10271148wrh.34.1612619819901; Sat, 06 Feb 2021 05:56:59 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id u14sm11075943wmq.45.2021.02.06.05.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Feb 2021 05:56:59 -0800 (PST) From: zimoun To: divoplade , help-guix@gnu.org, Ricardo Wurmus Subject: Re: Wrapping an R script: how do I compose the R_LIBS_SITE environment variable? In-Reply-To: <57572613456b4704f097480b687fef4e8944cf68.camel@divoplade.fr> References: <57572613456b4704f097480b687fef4e8944cf68.camel@divoplade.fr> Date: Sat, 06 Feb 2021 14:53:39 +0100 Message-ID: <867dnlb8v0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="kGGOjU/H"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: E0304940250 X-Spam-Score: -2.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: L0sw3INhcx5m Hi, On Fri, 05 Feb 2021 at 17:14, divoplade wrote: > I am using guix to write R packages. For convenience, I created a small > R script that does the job. Is =E2=80=9Cguix import cran=E2=80=9D not enough? What is the source of th= ese R packages? Well, could you be more specific about =E2=80=9Cusing guix to write R packa= ges=E2=80=9D? > 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. This seems the job of Guix. > How do I compute that? I only care about R dependencies, so using the > whole recursive dependency tree of my package seems too much. Ricardo wrote a R helper: Basically, it does more or less what =E2=80=9Cguix install=E2=80=9D does bu= t directly in the R repl. Maybe it is what you want. Hope that helps, simon