diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-10-17 23:40:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-10-17 23:59:02 +0200 |
commit | 645b9df858683dc05ffa04c9eb2fdc45ccef4a65 (patch) | |
tree | 540031b1a9373e8492dfed0ce016514b45a3ea17 /tests/scripts-build.scm | |
parent | 31c2fd1e01d5f95cd1fb873c44f5fa4ac1164e69 (diff) | |
download | guix-645b9df858683dc05ffa04c9eb2fdc45ccef4a65.tar.gz |
guix build: Add '--with-graft'.
* guix/scripts/build.scm (transform-package-inputs/graft): New procedure. (%transformations): Add 'with-graft'. (%transformation-options): Likewise. (show-transformation-options-help): Document it. * tests/scripts-build.scm ("options->transformation, with-graft"): New test. * doc/guix.texi (Package Transformation Options): Document it.
Diffstat (limited to 'tests/scripts-build.scm')
-rw-r--r-- | tests/scripts-build.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm index e48c8da264..e2610904e2 100644 --- a/tests/scripts-build.scm +++ b/tests/scripts-build.scm @@ -102,4 +102,23 @@ ((("x" dep)) (eq? dep findutils))))))))))) +(test-assert "options->transformation, with-graft" + (let* ((p (dummy-package "guix.scm" + (inputs `(("foo" ,grep) + ("bar" ,(dummy-package "chbouib" + (native-inputs `(("x" ,grep))))))))) + (t (options->transformation '((with-input . "grep=findutils"))))) + (with-store store + (let ((new (t store p))) + (and (not (eq? new p)) + (match (package-inputs new) + ((("foo" dep1) ("bar" dep2)) + (and (string=? (package-full-name dep1) + (package-full-name grep)) + (eq? (package-replacement dep1) findutils) + (string=? (package-name dep2) "chbouib") + (match (package-native-inputs dep2) + ((("x" dep)) + (eq? (package-replacement dep) findutils))))))))))) + (test-end) |