[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
15/21: import: cpan: Updater provides input list.
From: |
guix-commits |
Subject: |
15/21: import: cpan: Updater provides input list. |
Date: |
Wed, 31 May 2023 17:52:50 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit a738c1a0c75af8b65ab5cad893e9ac2af6633d29
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed May 17 22:30:45 2023 +0200
import: cpan: Updater provides input list.
* guix/import/cpan.scm (latest-release): Add 'inputs' field.
* tests/cpan.scm ("package-latest-release"): New test.
---
guix/import/cpan.scm | 3 ++-
tests/cpan.scm | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index b6587d6821..b87736eef6 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -354,7 +354,8 @@ in RELEASE, a <cpan-release> record."
(upstream-source
(package (package-name package))
(version version)
- (urls (list url)))))))
+ (urls (list url))
+ (inputs (cpan-module-inputs release)))))))
(define %cpan-updater
(upstream-updater
diff --git a/tests/cpan.scm b/tests/cpan.scm
index c9dd6d36de..5fcce85d8d 100644
--- a/tests/cpan.scm
+++ b/tests/cpan.scm
@@ -21,7 +21,10 @@
(define-module (test-cpan)
#:use-module (guix import cpan)
#:use-module (guix base32)
+ #:use-module (guix upstream)
+ #:use-module ((guix download) #:select (url-fetch))
#:use-module (gcrypt hash)
+ #:use-module (guix tests)
#:use-module (guix tests http)
#:use-module ((guix store) #:select (%graft?))
#:use-module (srfi srfi-64)
@@ -92,6 +95,30 @@
(x
(pk 'fail x #f))))))
+(test-equal "package-latest-release"
+ (list '("http://example.com/Foo-Bar-0.1.tar.gz")
+ #f
+ (list (upstream-input
+ (name "Test-Script")
+ (downstream-name "perl-test-script")
+ (type 'propagated))))
+ (with-http-server `((200 ,test-json)
+ (200 ,test-source)
+ (200 "{ \"distribution\" : \"Test-Script\" }"))
+ (define source
+ (parameterize ((%metacpan-base-url (%local-url)))
+ (package-latest-release
+ (dummy-package "perl-test-script"
+ (version "0.0.0")
+ (source (dummy-origin
+ (method url-fetch)
+ (uri "mirror://cpan/Foo-Bar-0.0.0.tgz"))))
+ (list %cpan-updater))))
+
+ (list (upstream-source-urls source)
+ (upstream-source-signature-urls source)
+ (upstream-source-inputs source))))
+
(test-equal "metacpan-url->mirror-url, http"
"mirror://cpan/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz"
(metacpan-url->mirror-url
- 07/21: doc: Mention 'guix refresh -u' for third-party channels., (continued)
- 07/21: doc: Mention 'guix refresh -u' for third-party channels., guix-commits, 2023/05/31
- 11/21: upstream: Remove <upstream-input-change> and related code., guix-commits, 2023/05/31
- 10/21: upstream: 'update-package-source' edits input fields., guix-commits, 2023/05/31
- 12/21: tests: upstream: Restore test that was skipped., guix-commits, 2023/05/31
- 16/21: import: elpa: Updater provides input list., guix-commits, 2023/05/31
- 20/21: gnu: Add updater input properties for R and Python packages., guix-commits, 2023/05/31
- 21/21: tests: Use quasiquoted 'match' patterns for package sexps., guix-commits, 2023/05/31
- 05/21: import: utils: 'call-with-networking-exception-handler' doesn't unwind., guix-commits, 2023/05/31
- 04/21: tests: pypi: Rewrite tests using a local HTTP server., guix-commits, 2023/05/31
- 14/21: import: cpan: Represent dependencies as <upstream-input> records., guix-commits, 2023/05/31
- 15/21: import: cpan: Updater provides input list.,
guix-commits <=
- 19/21: upstream: Honor package properties for ignored and extra inputs., guix-commits, 2023/05/31
- 13/21: import: cpan: Remove unary 'string-append' call., guix-commits, 2023/05/31
- 18/21: import: gem: Updater provides input list., guix-commits, 2023/05/31
- 03/21: tests: http: Allow responses to specify a path., guix-commits, 2023/05/31
- 17/21: import: gem: Factorize "bundler" special case for name mapping., guix-commits, 2023/05/31