guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: import: cran: guix-import-cran: Use (guix import utils).


From: guix-commits
Subject: 01/02: import: cran: guix-import-cran: Use (guix import utils).
Date: Thu, 29 Aug 2019 02:07:41 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 54ddd852209a0bd8500dc7dd5775d5dd87a9a017
Author: Ricardo Wurmus <address@hidden>
Date:   Wed Aug 28 16:48:55 2019 +0200

    import: cran: guix-import-cran: Use (guix import utils).
    
    * guix/scripts/import/cran.scm (guix-import-cran): Use PACKAGE->DEFINITION
    from (guix import utils) instead of custom procedure.
---
 guix/scripts/import/cran.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm
index 794fb71..b6592f7 100644
--- a/guix/scripts/import/cran.scm
+++ b/guix/scripts/import/cran.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <address@hidden>
-;;; Copyright © 2015, 2017 Ricardo Wurmus <address@hidden>
+;;; Copyright © 2015, 2017, 2019 Ricardo Wurmus <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,6 +22,7 @@
   #:use-module (guix utils)
   #:use-module (guix scripts)
   #:use-module (guix import cran)
+  #:use-module (guix import utils)
   #:use-module (guix scripts import)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
@@ -96,11 +97,7 @@ Import and convert the CRAN package for PACKAGE-NAME.\n"))
       ((package-name)
        (if (assoc-ref opts 'recursive)
            ;; Recursive import
-           (map (match-lambda
-                  ((and ('package ('name name) . rest) pkg)
-                   `(define-public ,(string->symbol name)
-                      ,pkg))
-                  (_ #f))
+           (map package->definition
                 (reverse
                  (stream->list
                   (cran-recursive-import package-name



reply via email to

[Prev in Thread] Current Thread [Next in Thread]