From 2ba45edf2f4dfdd57e9416735128052ad4d5ee12 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 7 Apr 2018 18:18:37 +0200 Subject: base: Pass the correct load path to the 'evaluate' command. The previous load path was potentially incorrect since commit 2fe7ff87e23b18d49bd33cffc4766b7eaa382054. * src/cuirass/base.scm (evaluate)[tokenize, load-path]: New variables. Assume #:load-path is colon-separated. Pass LOAD-PATH as the second argument to 'evaluate'. * doc/cuirass.texi (Database): Adjust documentation. --- src/cuirass/base.scm | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index c9c5ec1..9e930d4 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -253,12 +253,24 @@ in SOURCE directory. Return a list of jobs." (#:system . ,(derivation-system drv)) ,@job))) + (define (tokenize str) + (string-tokenize str (char-set-complement (char-set #\:)))) + + (define load-path + (match (assq-ref spec #:load-path) + (#f + "") + ((= tokenize path) + (string-join (map (lambda (entry) + (if (string-prefix? "/" entry) + entry + (string-append source "/" entry))) + path) + ":")))) + (let* ((port (non-blocking-port - (open-pipe* OPEN_READ - "evaluate" - (string-append (%package-cachedir) "/" - (assq-ref spec #:name) "/" - (assq-ref spec #:load-path)) + (open-pipe* OPEN_READ "evaluate" + load-path (%guix-package-path) source (object->string spec)))) (result (match (read/non-blocking port) -- cgit v1.2.3