diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-09-30 12:01:32 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-09-30 12:05:27 +0200 |
commit | 79355ae3e84359716f5135cc7083e72246bc8bf9 (patch) | |
tree | 6b61851e2153581578bb78ef0f177b8841ee5db7 /guix/import/gem.scm | |
parent | 39d6b9c99f297e14fc4f47f002be3d40556726be (diff) | |
parent | 86d8f6d3efb8300a3354735cbf06be6c01e23243 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/import/gem.scm')
-rw-r--r-- | guix/import/gem.scm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/guix/import/gem.scm b/guix/import/gem.scm index fc06b0d748..3d0c190656 100644 --- a/guix/import/gem.scm +++ b/guix/import/gem.scm @@ -29,7 +29,7 @@ #:use-module (guix import json) #:use-module (guix packages) #:use-module (guix upstream) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix base32) #:use-module (guix build-system ruby) #:export (gem->guix-package @@ -155,6 +155,17 @@ package on RubyGems." ;; e.g. "https://rubygems.org/downloads/hashery-2.1.1.gem" (substring source-url 31 (string-rindex source-url #\-)))) +(define (string->license str) + "Convert the string STR into a license object." + (match str + ("GNU LGPL" license:lgpl2.0) + ("GPL" license:gpl3) + ((or "BSD" "BSD License") license:bsd-3) + ((or "MIT" "MIT license" "Expat license") license:expat) + ("Public domain" license:public-domain) + ((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." |