From 31ef99a8a590cc52cea0cfda3d45651504bf1cb9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 1 Jul 2012 00:21:16 +0200 Subject: 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. --- guix/store.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'guix/store.scm') 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." -- cgit v1.2.3