[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/06: gnu: Add 'package-for-guile-2.0'.
From: |
Ludovic Courtès |
Subject: |
03/06: gnu: Add 'package-for-guile-2.0'. |
Date: |
Sun, 19 Mar 2017 13:16:10 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 8f4acad71b3afa56f2b54ada1cee2c25f7ded45f
Author: Ludovic Courtès <address@hidden>
Date: Sun Mar 19 17:37:49 2017 +0100
gnu: Add 'package-for-guile-2.0'.
* gnu/packages/guile.scm (guile-2.2-package-name): Rename to...
(guile-variant-package-name): ... this. Change to return a lambda.
(package-for-guile-2.2): Adjust accordingly.
(package-for-guile-2.0): New procedure.
---
gnu/packages/guile.scm | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index c172fd3..8313f3f 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -261,20 +261,25 @@ without requiring the source code to be rewritten.")
(files '("lib/guile/2.2/site-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 (guile-variant-package-name prefix)
+ (lambda (name)
+ "Return NAME with PREFIX instead of \"guile-\", when applicable."
+ (if (string-prefix? "guile-" name)
+ (string-append prefix "-"
+ (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-2.2 instead of GUILE-2.0.
(package-input-rewriting `((,guile-2.0 . ,guile-2.2))
- guile-2.2-package-name))
+ (guile-variant-package-name "guile2.2")))
+
+(define package-for-guile-2.0
+ ;; Likewise, but the other way around. :-)
+ (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
+ (guile-variant-package-name "guile2.0")))
(define-public guile-for-guile-emacs
(package (inherit guile-2.2)
- branch master updated (f729a4d -> 7c86c03), Ludovic Courtès, 2017/03/19
- 01/06: gnu: Add GNU Mach., Ludovic Courtès, 2017/03/19
- 04/06: gnu: haunt: Default to Guile 2.2., Ludovic Courtès, 2017/03/19
- 02/06: gnu: Rename "guile-next" to "guile"., Ludovic Courtès, 2017/03/19
- 03/06: gnu: Add 'package-for-guile-2.0'.,
Ludovic Courtès <=
- 05/06: gnu: guile-reader: Default to Guile 2.2., Ludovic Courtès, 2017/03/19
- 06/06: gnu: guile-commonmark: Default to Guile 2.2., Ludovic Courtès, 2017/03/19