summary refs log tree commit diff
diff options
context:
space:
mode:
authorSarah Morgensen <iskarian@mgsn.dev>2021-09-16 18:27:09 -0700
committerLudovic Courtès <ludo@gnu.org>2021-09-18 23:08:32 +0200
commit281ede2e7db73fa0632b80c084bce9611962b353 (patch)
treeaaf67c8a958f0576974273dbe504dcd2804a0ccc
parentb3907e304d6e66fbd3cffd71446ac8c46d26d849 (diff)
downloadguix-281ede2e7db73fa0632b80c084bce9611962b353.tar.gz
import: go: Match "go-import" meta tags anywhere.
Some personal sites forget to put <meta name="go-import" ...> in a
<head> element, so look anywhere for them.

Partly fixes <https://issues.guix.gnu.org/50595>.
Reported by Stephen Paul Weber <singpolyma@singpolyma.net>.

* guix/import/go.scm (fetch-module-meta-data): Match "go-import" meta
tags anywhere in the page.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/import/go.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/import/go.scm b/guix/import/go.scm
index fe7387dec2..9769b557ae 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -480,7 +480,7 @@ build a package."
                          (strip-.git-suffix/maybe repo-url)))))
   ;; <meta name="go-import" content="import-prefix vcs repo-root">
   (let* ((meta-data (http-fetch* (format #f "https://~a?go-get=1" module-path)))
-         (select (sxpath `(// head (meta (@ (equal? (name "go-import"))))
+         (select (sxpath `(// (meta (@ (equal? (name "go-import"))))
                               // content))))
     (match (select (html->sxml meta-data #:strict? #t))
       (() #f)                           ;nothing selected