[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26346: [PATCH 19/20] build-system/asdf: Handle versioned asdf depend
From: |
Andy Patterson |
Subject: |
bug#26346: [PATCH 19/20] build-system/asdf: Handle versioned asdf dependencies. |
Date: |
Sat, 8 Apr 2017 23:43:32 -0400 |
Add support for depencies of the form (:version <name> <version>).
* guix/build/lisp-utils.scm (normalize-dependency): New variable.
(make-asd-file)[dependencies]: Use it to generate dependencies with normalized
names.
[dependency-name]: New variable.
[registry]: Use it to flatten the normalized dependencies.
---
guix/build/lisp-utils.scm | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm
index 6d9341bb2..3744bac9d 100644
--- a/guix/build/lisp-utils.scm
+++ b/guix/build/lisp-utils.scm
@@ -81,6 +81,13 @@
"Replace invalid characters in STR with a hyphen."
(string-join (string-tokenize str valid-char-set) "-"))
+(define (normalize-dependency dependency)
+ "Normalize the name of DEPENDENCY."
+ (match dependency
+ ((:version name rest ...)
+ `(:version ,(normalize-string name) ,@rest))
+ (name (normalize-string name))))
+
(define (inputs->asd-file-map inputs)
"Produce a hash table of the form (system . asd-file), where system is the
name of an ASD system, and asd-file is the full path to its definition."
@@ -273,16 +280,21 @@ system to find its dependencies, as described by
GENERATE-DEPENDENCY-LINKS."
(system-dependencies system system-asd-file)))
(if (eq? 'NIL deps)
'()
- (map normalize-string deps))))
+ (map normalize-dependency deps))))
(define lisp-input-map
(inputs->asd-file-map inputs))
+ (define dependency-name
+ (match-lambda
+ ((_ name _ ...) name)
+ (name name)))
+
(define registry
(filter-map hash-get-handle
(make-list (length dependencies)
lisp-input-map)
- dependencies))
+ (map dependency-name dependencies)))
(call-with-output-file asd-file
(lambda (port)
--
2.12.2
- bug#26346: [PATCH 08/17] build-system/asdf: Keep ecl's generated archive files., (continued)
- bug#26346: [PATCH 08/17] build-system/asdf: Keep ecl's generated archive files., Andy Patterson, 2017/04/03
- bug#26346: [PATCH 15/17] build-system/asdf: Simplify the use of lisp-eval-program., Andy Patterson, 2017/04/03
- bug#26346: [PATCH 16/17] build-system/asdf: Retain references to source files for binary outputs., Andy Patterson, 2017/04/03
- bug#26346: [PATCH 11/17] build-system/asdf: Pass the system name as an argument to the builder., Andy Patterson, 2017/04/03
- bug#26346: [PATCH 10/17] build-system/asdf: Parameterize the lisp type and implementation globally., Andy Patterson, 2017/04/03
- bug#26346: [PATCH 12/17] build-system/asdf: Always pre-load the system's definition file., Andy Patterson, 2017/04/03
- bug#26346: [PATCH 05/17] gnu: cl-stumpwm: Build the library in "lib" and the program in "bin"., Andy Patterson, 2017/04/03
- bug#26346: [PATCH 18/20] build-system/asdf: Handle tests defined in external systems., Andy Patterson, 2017/04/08
- bug#26346: [PATCH] asdf-build-system improvements., Andy Patterson, 2017/04/08