From b74ca403cbb11c60d57b6a0148d97c6572019754 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 19 Sep 2021 11:10:16 +0200 Subject: build-system/haskell: Explain failure. Provide human-readable failure message and explain how to fix it. * guix/build/haskell-build-system.scm (register): Raise error if source file does not exist. --- guix/build/haskell-build-system.scm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'guix/build/haskell-build-system.scm') diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm index 4d0bf6f38a..ef6cb316ee 100644 --- a/guix/build/haskell-build-system.scm +++ b/guix/build/haskell-build-system.scm @@ -217,6 +217,8 @@ (define (install-transitive-deps conf-file src dest) (if (not (vhash-assoc id seen)) (let ((dep-conf (string-append src "/" id ".conf")) (dep-conf* (string-append dest "/" id ".conf"))) + (when (not (file-exists? dep-conf)) + (error (format #f "File ~a does not exist. This usually means the dependency ~a is missing. Was checking conf-file ~a." dep-conf id conf-file))) (copy-file dep-conf dep-conf*) ;XXX: maybe symlink instead? (loop (vhash-cons id #t seen) (append lst (conf-depends dep-conf)))) -- cgit v1.2.3