From 91e05559bdf21b49686cc2629c44a6d0a6db0a61 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 11 Jan 2019 09:27:21 +0100 Subject: [PATCH] import: cran: Suggest input changes. * guix/import/cran.scm (latest-cran-release, latest-bioconductor-release): Return input-changes. --- guix/import/cran.scm | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index 15163bd165..b287be6941 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus ;;; Copyright © 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2017 Mathieu Othacehe ;;; @@ -390,11 +390,11 @@ (define (package->upstream-name package) (_ #f))) (_ #f))))) -(define (latest-cran-release package) - "Return an for the latest release of PACKAGE." +(define (latest-cran-release pkg) + "Return an for the latest release of the package PKG." (define upstream-name - (package->upstream-name package)) + (package->upstream-name pkg)) (define meta (fetch-description 'cran upstream-name)) @@ -403,15 +403,18 @@ (define meta (let ((version (assoc-ref meta "Version"))) ;; CRAN does not provide signatures. (upstream-source - (package (package-name package)) + (package (package-name pkg)) (version version) - (urls (cran-uri upstream-name version)))))) + (urls (cran-uri upstream-name version)) + (input-changes + (changed-inputs pkg + (description->package 'cran meta))))))) -(define (latest-bioconductor-release package) - "Return an for the latest release of PACKAGE." +(define (latest-bioconductor-release pkg) + "Return an for the latest release of the package PKG." (define upstream-name - (package->upstream-name package)) + (package->upstream-name pkg)) (define version (latest-bioconductor-package-version upstream-name)) @@ -419,9 +422,13 @@ (define version (and version ;; Bioconductor does not provide signatures. (upstream-source - (package (package-name package)) + (package (package-name pkg)) (version version) - (urls (bioconductor-uri upstream-name version))))) + (urls (bioconductor-uri upstream-name version)) + (input-changes + (changed-inputs + pkg + (cran->guix-package upstream-name 'bioconductor)))))) (define (cran-package? package) "Return true if PACKAGE is an R package from CRAN."