diff options
| author | Sarthak Shah <shahsarthakw@gmail.com> | 2023-04-25 17:52:10 +0530 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2023-05-04 17:06:44 +0200 |
| commit | ae11fcb84ac478dfa56d322ef08890645183a087 (patch) | |
| tree | 5c6c5131278d1534037fee8a95a4faf9a11b3dbd /tests/transformations.scm | |
| parent | b20b7e61a33e2a6647397de31daa59431bb8e18e (diff) | |
transformations: Add '--with-configure-flag'.
* 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 <ludo@gnu.org>
Diffstat (limited to 'tests/transformations.scm')
| -rw-r--r-- | tests/transformations.scm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/transformations.scm b/tests/transformations.scm index 1fa2c0bba82..704818b9ed1 100644 --- a/tests/transformations.scm +++ b/tests/transformations.scm | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #:use-module ((guix gexp) | 33 | #:use-module ((guix gexp) |
| 34 | #:select (local-file? local-file-file | 34 | #:select (local-file? local-file-file |
| 35 | computed-file? computed-file-gexp | 35 | computed-file? computed-file-gexp |
| 36 | gexp-input-thing)) | 36 | gexp-input-thing gexp->approximate-sexp)) |
| 37 | #:use-module (guix ui) | 37 | #:use-module (guix ui) |
| 38 | #:use-module (guix utils) | 38 | #:use-module (guix utils) |
| 39 | #:use-module (guix git) | 39 | #:use-module (guix git) |
| @@ -408,6 +408,17 @@ | |||
| 408 | (package-full-name grep)) | 408 | (package-full-name grep)) |
| 409 | (package-arguments (package-replacement dep0)))))))) | 409 | (package-arguments (package-replacement dep0)))))))) |
| 410 | 410 | ||
| 411 | (test-equal "options->transformation, with-configure-flag" | ||
| 412 | '(append '() '("--flag=42")) | ||
| 413 | (let* ((p (dummy-package "foo" | ||
| 414 | (build-system gnu-build-system))) | ||
| 415 | (t (options->transformation | ||
| 416 | '((with-configure-flag . "foo=--flag=42"))))) | ||
| 417 | (let ((new (t p))) | ||
| 418 | (match (package-arguments new) | ||
| 419 | ((#:configure-flags flags) | ||
| 420 | (gexp->approximate-sexp flags)))))) | ||
| 421 | |||
| 411 | (test-assert "options->transformation, without-tests" | 422 | (test-assert "options->transformation, without-tests" |
| 412 | (let* ((dep (dummy-package "dep")) | 423 | (let* ((dep (dummy-package "dep")) |
| 413 | (p (dummy-package "foo" | 424 | (p (dummy-package "foo" |
