diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2022-06-26 10:36:18 +0200 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2022-06-30 11:27:12 +0200 |
commit | 3496b0684dd315b24e402b5fc228da538a654658 (patch) | |
tree | 60591a15915adb0adb0f9348646b98c4f5fcfbc4 | |
parent | d26ce01c9a11097ea8703d8200358a345cb99531 (diff) | |
download | guix-3496b0684dd315b24e402b5fc228da538a654658.tar.gz |
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>.
-rw-r--r-- | guix/import/cran.scm | 19 |
1 files 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 |