summary refs log tree commit diff
path: root/tests/gexp.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-26 22:14:11 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-28 10:39:58 +0100
commit8856f409d13cd7376be4319b9f75df0692c009d6 (patch)
tree74855d6b0c022dc1409b98301b799d93524e2a0d /tests/gexp.scm
parent01e7ca5410e45f63a39f16a6e8156f3e0898141a (diff)
downloadguix-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/gexp.scm')
-rw-r--r--tests/gexp.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index ab60bdab68..7ae9201c81 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -476,7 +476,15 @@
     (return (and (string=? (readlink (string-append out "/foo")) guile)
                  (string=? (readlink out2) file)
                  (equal? refs (list (dirname (dirname guile))))
-                 (equal? refs2 (list file))))))
+                 (equal? refs2 (list file))
+                 (null? (derivation-properties drv))))))
+
+(test-assertm "gexp->derivation properties"
+  (mlet %store-monad ((drv (gexp->derivation "foo"
+                                             #~(mkdir #$output)
+                                             #:properties '((type . test)))))
+    (return (equal? '((type . test))
+                    (derivation-properties drv)))))
 
 (test-assertm "gexp->derivation vs. grafts"
   (mlet* %store-monad ((graft?  (set-grafting #f))