snix: Prefer synopses from the Womb rather than from Nixpkgs.

* guix/snix.scm (snix-derivation->guix-package): When NAME is
  in (official-gnu-packages), use this synopsis instead of the one from
  Nixpkgs.
This commit is contained in:
Ludovic Courtès 2013-04-20 11:52:50 +02:00
parent f7758740ed
commit f286f71634
1 changed files with 11 additions and 2 deletions

View File

@ -34,6 +34,7 @@
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix base32) #:use-module (guix base32)
#:use-module (guix config) #:use-module (guix config)
#:use-module (guix gnu-maintenance)
#:export (open-nixpkgs #:export (open-nixpkgs
xml->snix xml->snix
nixpkgs->guix-package)) nixpkgs->guix-package))
@ -435,8 +436,16 @@ location of DERIVATION."
(home-page ,(and=> (find-attribute-by-name "homepage" meta) (home-page ,(and=> (find-attribute-by-name "homepage" meta)
attribute-value)) attribute-value))
(synopsis ,(and=> (find-attribute-by-name "description" meta) (synopsis
attribute-value)) ;; For GNU packages, prefer the official synopsis.
,(or (false-if-exception
(and=> (find (lambda (gnu-package)
(equal? (gnu-package-name gnu-package)
name))
(official-gnu-packages))
gnu-package-doc-summary))
(and=> (find-attribute-by-name "description" meta)
attribute-value)))
(description (description
,(and=> (find-attribute-by-name "longDescription" meta) ,(and=> (find-attribute-by-name "longDescription" meta)
attribute-value)) attribute-value))