summaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-01 00:21:16 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-01 00:27:27 +0200
commit31ef99a8a590cc52cea0cfda3d45651504bf1cb9 (patch)
tree0d34bf028b1898594ce29b9df2689118232e0f3f /guix/store.scm
parente036c31bc607ec1be8037294bdfd90723f3458a8 (diff)
Add the `valid-path?' RPC.
* guix/store.scm (valid-path?): New procedure. * tests/builders.scm ("http-fetch", "gnu-build"): Use it. * tests/derivations.scm ("add-to-store, flat", "add-to-store, recursive", "derivation with no inputs", "build derivation with 1 source", "build derivation with coreutils", "build-expression->derivation with expression returning #f"): Likewise.
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 1ecb2cc359..b525994672 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -42,6 +42,7 @@
open-connection
set-build-options
+ valid-path?
add-text-to-store
add-to-store
build-derivations
@@ -374,6 +375,10 @@ again until #t is returned or an error is raised."
(or done? (loop (process-stderr server))))
(read-arg return s))))))
+(define-operation (valid-path? (string path))
+ "Return #t when PATH is a valid store path."
+ boolean)
+
(define-operation (add-text-to-store (string name) (string text)
(string-list references))
"Add TEXT under file NAME in the store."