summaryrefslogtreecommitdiff
path: root/guix/import/launchpad.scm
diff options
context:
space:
mode:
authorJakub Kądziołka <kuba@kadziolka.net>2020-07-23 21:43:06 +0200
committerJakub Kądziołka <kuba@kadziolka.net>2020-07-23 21:43:06 +0200
commitd726b954baaeff876ce9728e00920fa45f529f9a (patch)
tree4b767b7586a1082dd2691bc33c3e45ace044e6e5 /guix/import/launchpad.scm
parent9a74a7db8626bc139307d115f5cec2648f5273ad (diff)
parente165a2492d73d37c8b95d6970d453b9d88911ee6 (diff)
Merge branch 'master' into core-updates
Conflicts: gnu/packages/ruby.scm
Diffstat (limited to 'guix/import/launchpad.scm')
-rw-r--r--guix/import/launchpad.scm21
1 files changed, 11 insertions, 10 deletions
diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm
index 1a15f28077..c7375837c7 100644
--- a/guix/import/launchpad.scm
+++ b/guix/import/launchpad.scm
@@ -57,16 +57,17 @@ false if none is recognized"
"/" new-version "/+download/" repo "-" new-version ext))
(#t #f))))) ; Some URLs are not recognised.
- (let ((source-uri (and=> (package-source old-package) origin-uri))
- (fetch-method (and=> (package-source old-package) origin-method)))
- (cond
- ((eq? fetch-method download:url-fetch)
- (match source-uri
- ((? string?)
- (updated-url source-uri))
- ((source-uri ...)
- (find updated-url source-uri))))
- (else #f))))
+ (match (package-source old-package)
+ ((? origin? origin)
+ (let ((source-uri (origin-uri origin))
+ (fetch-method (origin-method origin)))
+ (and (eq? fetch-method download:url-fetch)
+ (match source-uri
+ ((? string?)
+ (updated-url source-uri))
+ ((source-uri ...)
+ (find updated-url source-uri))))))
+ (_ #f)))
(define (launchpad-package? package)
"Return true if PACKAGE is a package from Launchpad, else false."