diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-02-13 23:14:05 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-02-13 23:19:49 +0100 |
commit | ce45eb4c385e3b473bc6746a8b58452865f69977 (patch) | |
tree | 30db560ed41ee569b4615d6d5c4bb6a868fa9706 /tests/gexp.scm | |
parent | b8bedf6051200b0c8eb6ddf4ac1b155466caa3ec (diff) | |
download | patches-ce45eb4c385e3b473bc6746a8b58452865f69977.tar patches-ce45eb4c385e3b473bc6746a8b58452865f69977.tar.gz |
gexp: Add #:graft? parameter to 'gexp->derivation'.
* guix/gexp.scm (gexp->derivation): Add #:graft? parameter and honor it.
* tests/gexp.scm ("gexp->derivation vs. grafts"): New test.
* doc/guix.texi (G-Expressions): Update 'gexp->derivation'
documentation.
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r-- | tests/gexp.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm index 68c470d3b6..0b189b570b 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -249,6 +249,23 @@ (equal? refs (list (dirname (dirname guile)))) (equal? refs2 (list file)))))) +(test-assertm "gexp->derivation vs. grafts" + (mlet* %store-monad ((p0 -> (dummy-package "dummy" + (arguments + '(#:implicit-inputs? #f)))) + (r -> (package (inherit p0) (name "DuMMY"))) + (p1 -> (package (inherit p0) (replacement r))) + (exp0 -> (gexp (frob (ungexp p0) (ungexp output)))) + (exp1 -> (gexp (frob (ungexp p1) (ungexp output)))) + (void (set-guile-for-build %bootstrap-guile)) + (drv0 (gexp->derivation "t" exp0)) + (drv1 (gexp->derivation "t" exp1)) + (drv1* (gexp->derivation "t" exp1 #:graft? #f))) + (return (and (not (string=? (derivation->output-path drv0) + (derivation->output-path drv1))) + (string=? (derivation->output-path drv0) + (derivation->output-path drv1*)))))) + (test-assertm "gexp->derivation, composed gexps" (mlet* %store-monad ((exp0 -> (gexp (begin (mkdir (ungexp output)) |