aboutsummaryrefslogtreecommitdiff
path: root/guix/import/gem.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/import/gem.scm')
-rw-r--r--guix/import/gem.scm16
1 files changed, 2 insertions, 14 deletions
diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index bd5d5b3569..a2d99ddbca 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -166,20 +166,8 @@ package on RubyGems."
((or "Apache License, Version 2.0" "Apache 2.0") license:asl2.0)
(_ #f)))
-(define (gem-package? package)
- "Return true if PACKAGE is a gem package from RubyGems."
-
- (define (rubygems-url? url)
- (string-prefix? "https://rubygems.org/downloads/" url))
-
- (let ((source-url (and=> (package-source package) origin-uri))
- (fetch-method (and=> (package-source package) origin-method)))
- (and (eq? fetch-method download:url-fetch)
- (match source-url
- ((? string?)
- (rubygems-url? source-url))
- ((source-url ...)
- (any rubygems-url? source-url))))))
+(define gem-package?
+ (url-prefix-predicate "https://rubygems.org/downloads/"))
(define (latest-release package)
"Return an <upstream-source> for the latest release of PACKAGE."