~ruther/guix-local

aad560a56f7c5c9ea2bcf7c3e51973ef826f736f — Ludovic Courtès 12 years ago 840f71c
list-packages: Make 'snippet-link' more tolerant.

* build-aux/list-packages.scm (package->sxml)[snippet-link]: If
  'package-field-location' returns #f, use 'package-location.
1 files changed, 2 insertions(+), 1 deletions(-)

M build-aux/list-packages.scm
M build-aux/list-packages.scm => build-aux/list-packages.scm +2 -1
@@ 106,7 106,8 @@ decreasing, is 1."
       (basename patch)))

    (define (snippet-link snippet)
      (let ((loc (package-field-location package 'source)))
      (let ((loc (or (package-field-location package 'source)
                     (package-location package))))
        `(a (@ (href ,(location-url loc))
               (title "Link to patch snippet"))
            "snippet")))