gnu: Add 'package-for-guile-2.2' procedure and use it.

* gnu/packages/guile.scm (guile-2.2-package-name)
(package-for-guile-2.2): New procedures.
* gnu/packages/guile.scm (guile2.2-json, guile2.2-minikanren)
(guile2.2-irregex, guile2.2-commonmark): New variables.
This commit is contained in:
Ludovic Courtès 2016-09-07 18:39:44 +02:00
parent 757ce0f99d
commit 947a5d47a5
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 27 additions and 0 deletions

View File

@ -229,6 +229,21 @@ without requiring the source code to be rewritten.")
(files '("lib/guile/2.2/ccache"
"share/guile/site/2.2")))))))
(define (guile-2.2-package-name name)
"Return NAME with a \"guile2.2-\" prefix instead of \"guile-\", when
applicable."
(if (string-prefix? "guile-" name)
(string-append "guile2.2-"
(string-drop name
(string-length "guile-")))
name))
(define package-for-guile-2.2
;; A procedure that rewrites the dependency tree of the given package to use
;; GUILE-NEXT instead of GUILE-2.0.
(package-input-rewriting `((,guile-2.0 . ,guile-next))
guile-2.2-package-name))
(define-public guile-for-guile-emacs
(package (inherit guile-next)
(name "guile-for-guile-emacs")
@ -544,6 +559,9 @@ http:://json.org specification. These are the main features:
- Allows JSON pretty printing.")
(license lgpl3+)))
(define-public guile2.2-json
(package-for-guile-2.2 guile-json))
(define-public guile-minikanren
(package
(name "guile-minikanren")
@ -627,6 +645,9 @@ slightly from miniKanren mainline.
See http://minikanren.org/ for more on miniKanren generally.")
(license expat)))
(define-public guile2.2-minikanren
(package-for-guile-2.2 guile-minikanren))
(define-public guile-irregex
(package
(name "guile-irregex")
@ -709,6 +730,9 @@ string-based regular expressions. It implements SRFI 115 and is deeply
inspired by the SCSH regular expression system.")
(license bsd-3)))
(define-public guile2.2-irregex
(package-for-guile-2.2 guile-irregex))
;; There are two guile-gdbm packages, one using the FFI and one with
;; direct C bindings, hence the verbose name.
@ -1231,4 +1255,7 @@ is no support for parsing block and inline level HTML.")
(home-page "https://github.com/OrangeShark/guile-commonmark")
(license lgpl3+)))
(define-public guile2.2-commonmark
(package-for-guile-2.2 guile-commonmark))
;;; guile.scm ends here