guix-commits
[Top][All Lists]
Advanced

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

01/02: import: gem: Beautify only the description, not the synopsis.


From: Ben Woodcroft
Subject: 01/02: import: gem: Beautify only the description, not the synopsis.
Date: Wed, 20 Jan 2016 12:11:52 +0000

benwoodcroft pushed a commit to branch master
in repository guix.

commit e88d5fa9ebab07d0b23cb3fc0f3f38bd41047e94
Author: Ben Woodcroft <address@hidden>
Date:   Sun Jan 17 09:12:14 2016 +1000

    import: gem: Beautify only the description, not the synopsis.
    
    * guix/import/gem.scm (make-gem-sexp): Add synopsis argument.
    (gem->guix-package): Pass unbeautified synopsis to make-gem-sexp.
    * tests/gem.scm: Adapt it.
---
 guix/import/gem.scm |    7 ++++---
 tests/gem.scm       |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index 3c42052..4b2a253 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -77,7 +77,7 @@ the package."
             (bytevector-u8-set! bv i (read-byte i))
             (loop (1+ i)))))))
 
-(define (make-gem-sexp name version hash home-page description
+(define (make-gem-sexp name version hash home-page synopsis description
                        dependencies licenses)
   "Return the `package' s-expression for a Ruby package with the given NAME,
 VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES."
@@ -101,7 +101,7 @@ VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and 
LICENSES."
                          (,'unquote
                           ,(string->symbol name))))
                      dependencies)))))
-     (synopsis ,description)    ; nothing better to use
+     (synopsis ,synopsis)
      (description ,description)
      (home-page ,home-page)
      (license ,(match licenses
@@ -117,6 +117,7 @@ VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and 
LICENSES."
          (let ((name         (assoc-ref package "name"))
                (version      (assoc-ref package "version"))
                (hash         (assoc-ref package "sha"))
+               (synopsis     (assoc-ref package "info")) ; nothing better to 
use
                (description  (beautify-description
                               (assoc-ref package "info")))
                (home-page    (assoc-ref package "homepage_uri"))
@@ -129,5 +130,5 @@ VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and 
LICENSES."
                                               "runtime")))
                (licenses     (map string->license
                                   (assoc-ref package "licenses"))))
-           (make-gem-sexp name version hash home-page
+           (make-gem-sexp name version hash home-page synopsis
                           description dependencies licenses)))))
diff --git a/tests/gem.scm b/tests/gem.scm
index 9efbda3..ebce809 100644
--- a/tests/gem.scm
+++ b/tests/gem.scm
@@ -69,7 +69,7 @@
            (("bundler" ('unquote 'bundler))
             ("ruby-bar" ('unquote 'ruby-bar)))))
          ('synopsis "A cool gem")
-         ('description "A cool gem")
+         ('description "This package provides a cool gem")
          ('home-page "https://example.com";)
          ('license ('list 'expat 'asl2.0)))
        #t)



reply via email to

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