guix-commits
[Top][All Lists]
Advanced

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

10/23: cran/bioconductor


From: guix-commits
Subject: 10/23: cran/bioconductor
Date: Mon, 4 Jul 2022 09:49:23 -0400 (EDT)

htgoebel pushed a commit to branch wip-import-version
in repository guix.

commit 3496b0684dd315b24e402b5fc228da538a654658
Author: Hartmut Goebel <h.goebel@crazy-compilers.com>
AuthorDate: Sun Jun 26 10:36:18 2022 +0200

    cran/bioconductor
    
    * (guix/import/cran.scm)[latest-cran-release]: Add keyword argument 
'version',
      issue error if version is given.
      [latest-bioconductor-release] Same. <version> rename to <latest-version>.
---
 guix/import/cran.scm | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 4e1ce7c010..cd548fafe1 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -640,8 +641,13 @@ s-expression corresponding to that package, or #f on 
failure."
              (_ #f)))
           (_ #f)))))
 
-(define (latest-cran-release pkg)
+(define* (latest-cran-release pkg #:key (version #f))
   "Return an <upstream-source> for the latest release of the package PKG."
+  (when version
+    (error
+     (formatted-message
+      (G_ "~a provides only the latest version of each package, sorry.")
+      "CRAN")))
 
   (define upstream-name
     (package->upstream-name pkg))
@@ -660,20 +666,25 @@ s-expression corresponding to that package, or #f on 
failure."
            (changed-inputs pkg
                            (description->package 'cran meta)))))))
 
-(define (latest-bioconductor-release pkg)
+(define* (latest-bioconductor-release pkg #:key (version #f))
   "Return an <upstream-source> for the latest release of the package PKG."
+  (when version
+    (error
+     (formatted-message
+      (G_ "~a provides only the latest version of each package, sorry.")
+      "bioconductor.org")))
 
   (define upstream-name
     (package->upstream-name pkg))
 
-  (define version
+  (define latest-version
     (latest-bioconductor-package-version upstream-name))
 
   (and version
        ;; Bioconductor does not provide signatures.
        (upstream-source
         (package (package-name pkg))
-        (version version)
+        (version latest-version)
         (urls (bioconductor-uri upstream-name version))
         (input-changes
          (changed-inputs



reply via email to

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