aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/guile.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-09-07 18:39:44 +0200
committerLudovic Courtès <ludo@gnu.org>2016-09-07 18:42:46 +0200
commit947a5d47a50252cb0b87b78a8f83f274dec593e2 (patch)
tree6c2a2ff94c7f916a2dc8ce235d00340cc48475c8 /gnu/packages/guile.scm
parent757ce0f99d5ffed86ee3258eef6c8841e82e1116 (diff)
downloadpatches-947a5d47a50252cb0b87b78a8f83f274dec593e2.tar
patches-947a5d47a50252cb0b87b78a8f83f274dec593e2.tar.gz
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.
Diffstat (limited to 'gnu/packages/guile.scm')
-rw-r--r--gnu/packages/guile.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 4276e34080..2f6ae30aab 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -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