~ruther/guix-local

947a5d47a50252cb0b87b78a8f83f274dec593e2 — Ludovic Courtès 9 years ago 757ce0f
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.
1 files changed, 27 insertions(+), 0 deletions(-)

M gnu/packages/guile.scm
M gnu/packages/guile.scm => gnu/packages/guile.scm +27 -0
@@ 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