guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: import: cran: Use CRAN’s canonical URL as home-pa


From: guix-commits
Subject: branch master updated: import: cran: Use CRAN’s canonical URL as home-page.
Date: Tue, 15 Dec 2020 17:34:50 -0500

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new f14bb29  import: cran: Use CRAN’s canonical URL as home-page.
f14bb29 is described below

commit f14bb29defb36051039e977ba3791b542d90578a
Author: Lars-Dominik Braun <ldb@leibniz-psychology.org>
AuthorDate: Wed Feb 5 08:26:08 2020 +0100

    import: cran: Use CRAN’s canonical URL as home-page.
    
    * guix/import/cran.scm (%cran-canonical-url): New variable.
    (description->package): Construct home-page using canonical URL.
    
    Signed-off-by: Christopher Baines <mail@cbaines.net>
---
 guix/import/cran.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 1d25a51..9d38be7 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -141,6 +141,7 @@ package definition."
      `((,type (,'quasiquote ,(format-inputs package-inputs)))))))
 
 (define %cran-url "https://cran.r-project.org/web/packages/";)
+(define %cran-canonical-url "https://cran.r-project.org/package=";)
 (define %bioconductor-url "https://bioconductor.org/packages/";)
 
 ;; The latest Bioconductor release is 3.12.  Bioconductor packages should be
@@ -441,6 +442,10 @@ from the alist META, which was derived from the R 
package's DESCRIPTION file."
                        ((bioconductor) %bioconductor-url)
                        ((git)          #f)
                        ((hg)           #f)))
+         (canonical-url-base (case repository
+                               ((cran)         %cran-canonical-url)
+                               ((bioconductor) %bioconductor-url)
+                               ((git)          #f)))
          (uri-helper (case repository
                        ((cran)         cran-uri)
                        ((bioconductor) bioconductor-uri)
@@ -456,7 +461,7 @@ from the alist META, which was derived from the R package's 
DESCRIPTION file."
                        ((hg)  (assoc-ref meta 'hg))
                        (else (match (listify meta "URL")
                                ((url rest ...) url)
-                               (_ (string-append base-url name))))))
+                               (_ (string-append canonical-url-base name))))))
          (source-url (case repository
                        ((git) (assoc-ref meta 'git))
                        ((hg)  (assoc-ref meta 'hg))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]