aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-04-20 11:52:50 +0200
committerLudovic Courtès <ludo@gnu.org>2013-04-20 11:52:50 +0200
commitf286f716344df693c392f6bdd902db07a9d91841 (patch)
tree3a0051104b12f28feed426556e339a2c0a864ee4
parentf7758740eda6b866233333a766e29183d16fe154 (diff)
downloadguix-f286f716344df693c392f6bdd902db07a9d91841.tar
guix-f286f716344df693c392f6bdd902db07a9d91841.tar.gz
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.
-rw-r--r--guix/snix.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/guix/snix.scm b/guix/snix.scm
index 0c19fecb28..04b5e7db2a 100644
--- a/guix/snix.scm
+++ b/guix/snix.scm
@@ -34,6 +34,7 @@
#:use-module (guix utils)
#:use-module (guix base32)
#:use-module (guix config)
+ #:use-module (guix gnu-maintenance)
#:export (open-nixpkgs
xml->snix
nixpkgs->guix-package))
@@ -435,8 +436,16 @@ location of DERIVATION."
(home-page ,(and=> (find-attribute-by-name "homepage" meta)
attribute-value))
- (synopsis ,(and=> (find-attribute-by-name "description" meta)
- attribute-value))
+ (synopsis
+ ;; 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
,(and=> (find-attribute-by-name "longDescription" meta)
attribute-value))