1 ;;; guix-license.el --- Licenses
3 ;; Copyright © 2016 Alex Kost <alezost@gmail.com>
5 ;; This file is part of GNU Guix.
7 ;; GNU Guix is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation, either version 3 of the License, or
10 ;; (at your option) any later version.
12 ;; GNU Guix is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
22 ;; This file provides the code to work with licenses of Guix packages.
27 (require 'guix-backend
)
30 (defun guix-lookup-license-url (license)
31 "Return URL of a LICENSE."
32 (or (guix-eval-read (guix-make-guile-expression
33 'lookup-license-uri license
))
34 (error "Hm, I don't know URL of '%s' license" license
)))
37 (defun guix-browse-license-url (license)
38 "Browse URL of a LICENSE."
39 (interactive (list (guix-read-license-name)))
40 (browse-url (guix-lookup-license-url license
)))
42 (provide 'guix-license
)
44 ;;; guix-license.el ends here