import: Beautify descriptions when appropriate.

* guix/import/elpa.scm (elpa-package->sexp)
* guix/import/gnu.scm (gnu-package->sexp)
* guix/import/hackage.scm (hackage-module->sexp)
* guix/import/minetest.scm (make-minetest-sexp)
* guix/import/opam.scm (opam->guix-package)
* guix/import/pypi.scm (make-pypi-sexp): Beautify descriptions.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Xinglu Chen 2021-12-17 14:10:40 +01:00 committed by Ludovic Courtès
parent 5cd1019488
commit 155fc235b5
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
6 changed files with 9 additions and 7 deletions

View file

@ -388,7 +388,7 @@ (define melpa-source
'())
(home-page ,(elpa-package-home-page pkg))
(synopsis ,(elpa-package-synopsis pkg))
(description ,(elpa-package-description pkg))
(description ,(beautify-description (elpa-package-description pkg)))
(license ,license))
dependencies-names))

View file

@ -100,7 +100,8 @@ (define sig-url
(file-sha256 tarball))))))
(build-system gnu-build-system)
(synopsis ,(gnu-package-doc-summary package))
(description ,(gnu-package-doc-description package))
(description ,(beautify-description
(gnu-package-doc-description package)))
(home-page ,(match (gnu-package-doc-urls package)
((head . tail) (qualified-url head))))
(license find-by-yourself!)))

View file

@ -33,7 +33,7 @@ (define-module (guix import hackage)
#:use-module ((guix utils) #:select (package-name->name+version
canonical-newline-port))
#:use-module (guix http-client)
#:use-module ((guix import utils) #:select (factorize-uri recursive-import))
#:use-module (guix import utils)
#:use-module (guix import cabal)
#:use-module (guix store)
#:use-module (gcrypt hash)
@ -315,7 +315,7 @@ (define (maybe-arguments)
,@(maybe-arguments)
(home-page ,(cabal-package-home-page cabal))
(synopsis ,(cabal-package-synopsis cabal))
(description ,(cabal-package-description cabal))
(description ,(beautify-description (cabal-package-description cabal)))
(license ,(string->license (cabal-package-license cabal))))
(append hackage-dependencies hackage-native-dependencies))))

View file

@ -322,7 +322,7 @@ (define (make-minetest-sexp author/name version repository commit
,@(maybe-propagated-inputs (map contentdb->package-name inputs))
(home-page ,home-page)
(synopsis ,(delete-cr synopsis))
(description ,(delete-cr description))
(description ,(beautify-description (delete-cr description)))
(license ,(if (eq? media-license license)
license
`(list ,media-license ,license)))

View file

@ -371,7 +371,8 @@ (define* (opam->guix-package name #:key (repo 'opam) version)
,(list 'quasiquote `((upstream-name . ,name))))))
(home-page ,(metadata-ref opam-content "homepage"))
(synopsis ,(metadata-ref opam-content "synopsis"))
(description ,(metadata-ref opam-content "description"))
(description ,(beautify-description
(metadata-ref opam-content "description")))
(license ,(spdx-string->license
(metadata-ref opam-content "license"))))
(filter

View file

@ -471,7 +471,7 @@ (define (maybe-upstream-name name)
,@(maybe-inputs native-inputs 'native-inputs)
(home-page ,home-page)
(synopsis ,synopsis)
(description ,description)
(description ,(beautify-description description))
(license ,(license->symbol license)))
upstream-dependencies))))))))