From 76c486196f299716be33df86d06b3ce2b79dd77f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 4 Apr 2017 00:00:41 +0200 Subject: packages: Catch invalid input errors for structs. Reported by Thomas Sigurdsen at . * guix/packages.scm (expand-input): Add 'guard' form around call to 'package-source-derivation'. * tests/packages.scm (dummy): New test. --- tests/packages.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/packages.scm b/tests/packages.scm index aa29758830..51dc1ba2b0 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -470,6 +470,14 @@ (package-derivation %store p) #f))) +(let ((dummy (dummy-package "foo" (inputs `(("x" ,(current-module))))))) + (test-equal "&package-input-error" + (list dummy (current-module)) + (guard (c ((package-input-error? c) + (list (package-error-package c) + (package-error-invalid-input c)))) + (package-derivation %store dummy)))) + (test-assert "reference to non-existent output" ;; See . (parameterize ((%graft? #f)) -- cgit 1.4.1