diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-11-26 22:14:11 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-11-28 10:39:58 +0100 |
commit | 8856f409d13cd7376be4319b9f75df0692c009d6 (patch) | |
tree | 74855d6b0c022dc1409b98301b799d93524e2a0d /tests/derivations.scm | |
parent | 01e7ca5410e45f63a39f16a6e8156f3e0898141a (diff) | |
download | guix-8856f409d13cd7376be4319b9f75df0692c009d6.tar guix-8856f409d13cd7376be4319b9f75df0692c009d6.tar.gz |
derivations: Add properties.
* guix/derivations.scm (derivation): Add #:properties parameter.
[user+system-env-vars]: Honor it.
(derivation-properties): New procedure.
(build-expression->derivation): Add #:properties and pass it to
'derivation'.
* guix/gexp.scm (gexp->derivation): Likewise.
* tests/derivations.scm ("derivation-properties"): New test.
* tests/gexp.scm ("gexp->derivation properties"): New test.
* doc/guix.texi (Derivations, G-Expressions): Adjust accordingly.
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r-- | tests/derivations.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index 159a6971b3..5f294c1827 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -1132,6 +1132,16 @@ ((p2 . _) (string<? p1 p2))))))))))))) +(test-equal "derivation-properties" + (list '() '((type . test))) + (let ((drv1 (build-expression->derivation %store "bar" + '(mkdir %output))) + (drv2 (build-expression->derivation %store "foo" + '(mkdir %output) + #:properties '((type . test))))) + (list (derivation-properties drv1) + (derivation-properties drv2)))) + (test-equal "map-derivation" "hello" (let* ((joke (package-derivation %store guile-1.8)) |