[Top][All Lists]

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

[bug#57460] [PATCH 11/20] refresh: Allow updating to a specific version

From: Hartmut Goebel
Subject: [bug#57460] [PATCH 11/20] refresh: Allow updating to a specific version (hexpm)
Date: Sun, 28 Aug 2022 15:18:37 +0200

* guix/import/hexpm.scm(latest-release): Rename to (import-release),
  add keyword-argument 'version'.
  If version is given, return an upstream-source for this version.
 guix/import/hexpm.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm
index 3b63837393..652df5dd0e 100644
--- a/guix/import/hexpm.scm
+++ b/guix/import/hexpm.scm
@@ -328,11 +328,11 @@ latest version of PACKAGE-NAME."
 ;;; Updater
-(define (latest-release package)
+(define* (import-release package #:key (version #f))
   "Return an <upstream-source> for the latest release of PACKAGE."
   (let* ((hexpm-name (guix-package->hexpm-name package))
          (hexpm      (lookup-hexpm hexpm-name))
-         (version    (hexpm-latest-release hexpm))
+         (version    (or version (hexpm-latest-release hexpm)))
          (url        (hexpm-uri hexpm-name version)))
      (package (package-name package))
@@ -344,4 +344,4 @@ latest version of PACKAGE-NAME."
    (name 'hexpm)
    (description "Updater for packages")
    (pred (url-prefix-predicate hexpm-package-url))
-   (import latest-release)))
+   (import import-release)))

reply via email to

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