From ae11fcb84ac478dfa56d322ef08890645183a087 Mon Sep 17 00:00:00 2001 From: Sarthak Shah Date: Tue, 25 Apr 2023 17:52:10 +0530 Subject: transformations: Add '--with-configure-flag'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/transformations.scm (transform-package-configure-flag): New procedure. (%transformation-options, %transformation-options) (show-transformation-options-help/detailed): Add it. * tests/transformations.scm ("options->transformation, with-configure-flag"): New test. * doc/guix.texi (Package Transformation Options): Document it. Co-authored-by: Ludovic Courtès --- tests/transformations.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/transformations.scm') diff --git a/tests/transformations.scm b/tests/transformations.scm index 1fa2c0bba8..704818b9ed 100644 --- a/tests/transformations.scm +++ b/tests/transformations.scm @@ -33,7 +33,7 @@ #:use-module ((guix gexp) #:select (local-file? local-file-file computed-file? computed-file-gexp - gexp-input-thing)) + gexp-input-thing gexp->approximate-sexp)) #:use-module (guix ui) #:use-module (guix utils) #:use-module (guix git) @@ -408,6 +408,17 @@ (package-full-name grep)) (package-arguments (package-replacement dep0)))))))) +(test-equal "options->transformation, with-configure-flag" + '(append '() '("--flag=42")) + (let* ((p (dummy-package "foo" + (build-system gnu-build-system))) + (t (options->transformation + '((with-configure-flag . "foo=--flag=42"))))) + (let ((new (t p))) + (match (package-arguments new) + ((#:configure-flags flags) + (gexp->approximate-sexp flags)))))) + (test-assert "options->transformation, without-tests" (let* ((dep (dummy-package "dep")) (p (dummy-package "foo" -- cgit 1.4.1