guix-commits
[Top][All Lists]
Advanced

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

05/06: import: cpan: Sort inputs.


From: Eric Bavier
Subject: 05/06: import: cpan: Sort inputs.
Date: Thu, 19 Feb 2015 05:54:22 +0000

bavier pushed a commit to branch master
in repository guix.

commit a0c2c4b45bb9c7b77f2b9a1562e791f1124cf93c
Author: Eric Bavier <address@hidden>
Date:   Fri Feb 13 21:34:40 2015 -0600

    import: cpan: Sort inputs.
    
    * guix/import/cpan.scm (cpan-module->sexp)[convert-inputs]: Sort returned 
list
      of inputs.
---
 guix/import/cpan.scm |   27 ++++++++++++++++-----------
 1 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 307681b..bd48c44 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -141,17 +141,22 @@ META."
       (#f
        '())
       ((inputs ...)
-       (delete-duplicates
-        ;; Listed dependencies may include core modules.  Filter those out.
-        (filter-map (match-lambda
-                     (("perl" . _)      ;implicit dependency
-                      #f)
-                     ((module . _)
-                      (and (not (core-module? module))
-                           (let ((name (guix-name (module->dist-name module))))
-                             (list name
-                                   (list 'unquote (string->symbol name)))))))
-                    inputs)))))
+       (sort
+        (delete-duplicates
+         ;; Listed dependencies may include core modules.  Filter those out.
+         (filter-map (match-lambda
+                      (("perl" . _)     ;implicit dependency
+                       #f)
+                      ((module . _)
+                       (and (not (core-module? module))
+                            (let ((name (guix-name (module->dist-name 
module))))
+                              (list name
+                                    (list 'unquote (string->symbol name)))))))
+                     inputs))
+        (lambda args
+          (match args
+            (((a _ ...) (b _ ...))
+             (string<? a b))))))))
 
   (define (maybe-inputs guix-name inputs)
     (match inputs



reply via email to

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