1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-25 10:31:49 +02:00

gexp: Add 'plain-file'.

* guix/gexp.scm (<plain-file>): New type.
  (plain-file, plain-file-compiler): New procedures.
* tests/gexp.scm ("one plain file"): New test.
* doc/guix.texi (G-Expressions): Document 'plain-file'.
This commit is contained in:
Ludovic Courtès
2015-06-03 11:45:27 +02:00
parent 74d441abee
commit 558e8b11d7
3 changed files with 48 additions and 2 deletions
+10
View File
@@ -109,6 +109,16 @@
(eq? x local)))
(equal? `(display ,intd) (gexp->sexp* exp)))))
(test-assert "one plain file"
(let* ((file (plain-file "hi" "Hello, world!"))
(exp (gexp (display (ungexp file))))
(expected (add-text-to-store %store "hi" "Hello, world!")))
(and (gexp? exp)
(match (gexp-inputs exp)
(((x "out"))
(eq? x file)))
(equal? `(display ,expected) (gexp->sexp* exp)))))
(test-assert "same input twice"
(let ((exp (gexp (begin
(display (ungexp coreutils))