From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH 4/7] import cran: Ignore default R packages. Date: Mon, 23 May 2016 17:40:05 +0200 Message-ID: <1464018008-1767-5-git-send-email-ricardo.wurmus@mdc-berlin.de> References: <1464018008-1767-1-git-send-email-ricardo.wurmus@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4ryI-0004Jw-Hf for guix-devel@gnu.org; Mon, 23 May 2016 11:40:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4ryC-00036f-VI for guix-devel@gnu.org; Mon, 23 May 2016 11:40:46 -0400 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:58624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4ryC-00036L-JE for guix-devel@gnu.org; Mon, 23 May 2016 11:40:40 -0400 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 0B36C3809C7 for ; Mon, 23 May 2016 17:40:40 +0200 (CEST) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y8KCBY9befUQ for ; Mon, 23 May 2016 17:40:34 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTPS for ; Mon, 23 May 2016 17:40:34 +0200 (CEST) In-Reply-To: <1464018008-1767-1-git-send-email-ricardo.wurmus@mdc-berlin.de> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * guix/import/cran.scm (default-r-packages): New variable. (description->package): Drop default R packages from list of inputs. --- guix/import/cran.scm | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index ff9dbd3..522df3e 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -148,6 +148,16 @@ empty list when the FIELD cannot be found." (string-any char-set:whitespace item))) (map string-trim-both items)))))) +(define default-r-packages + (list "stats" + "methods" + "utils" + "graphics" + "grDevices" + "parallel" + "grid" + "tools" + "matrix")) (define (guix-name name) "Return a Guix package name for a given R package name." @@ -178,11 +188,13 @@ from the alist META, which was derived from the R package's DESCRIPTION file." (_ #f))) (tarball (with-store store (download-to-store store source-url))) (sysdepends (map string-downcase (listify meta "SystemRequirements"))) - (propagate (lset-union equal? - (listify meta "Imports") - (listify meta "LinkingTo") - (delete "R" - (listify meta "Depends"))))) + (propagate (filter (lambda (name) + (not (member name default-r-packages))) + (lset-union equal? + (listify meta "Imports") + (listify meta "LinkingTo") + (delete "R" + (listify meta "Depends")))))) (values `(package (name ,(guix-name name)) -- 2.7.3