mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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.
This commit is contained in:
parent
d0bd632f89
commit
e88d5fa9eb
2 changed files with 5 additions and 4 deletions
|
@ -77,7 +77,7 @@ (define (read-byte i)
|
|||
(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 @@ (define (make-gem-sexp name version hash home-page description
|
|||
(,'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 @@ (define* (gem->guix-package package-name #:optional version)
|
|||
(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 @@ (define* (gem->guix-package package-name #:optional version)
|
|||
"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)))))
|
||||
|
|
|
@ -69,7 +69,7 @@ (define test-json
|
|||
(("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)
|
||||
|
|
Loading…
Reference in a new issue