summaryrefslogtreecommitdiff
path: root/test-env.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-04-15 23:42:27 +0200
committerLudovic Courtès <ludo@gnu.org>2013-04-15 23:42:55 +0200
commiteba783b7b20cbf84dfd0a04bc19e3bebbc9a30fc (patch)
tree7455d6c1275c168677ae25eb43f815641af22f43 /test-env.in
parent63b7c6c1f82486604abd6e3b6a6e14643d1f6621 (diff)
substitute-binary: Add a local cache.
* guix/scripts/substitute-binary.scm (%narinfo-cache-directory, %narinfo-ttl, %narinfo-negative-ttl): New variables. (with-atomic-file-output, object->fields, read-narinfo, write-narinfo, narinfo->string, string->narinfo, lookup-narinfo): New procedures. (fetch-narinfo): Adjust to use `read-narinfo'. (guix-substitute-binary): Ensure the existence of %NARINFO-CACHE-DIRECTORY. Use `lookup-narinfo' instead of `fetch-narinfo'.
Diffstat (limited to 'test-env.in')
-rw-r--r--test-env.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/test-env.in b/test-env.in
index 9a6257197c7..64440fb86af 100644
--- a/test-env.in
+++ b/test-env.in
@@ -45,9 +45,13 @@ then
45 rm -rf "$NIX_STATE_DIR/substituter-data" 45 rm -rf "$NIX_STATE_DIR/substituter-data"
46 mkdir -p "$NIX_STATE_DIR/substituter-data" 46 mkdir -p "$NIX_STATE_DIR/substituter-data"
47 47
48 # Place for the substituter's cache.
49 XDG_CACHE_HOME="$NIX_STATE_DIR/cache-$$"
50
48 export NIX_IGNORE_SYMLINK_STORE NIX_STORE_DIR \ 51 export NIX_IGNORE_SYMLINK_STORE NIX_STORE_DIR \
49 NIX_LOCALSTATE_DIR NIX_LOG_DIR NIX_STATE_DIR NIX_DB_DIR \ 52 NIX_LOCALSTATE_DIR NIX_LOG_DIR NIX_STATE_DIR NIX_DB_DIR \
50 NIX_ROOT_FINDER NIX_SETUID_HELPER GUIX_BINARY_SUBSTITUTE_URL 53 NIX_ROOT_FINDER NIX_SETUID_HELPER GUIX_BINARY_SUBSTITUTE_URL \
54 XDG_CACHE_HOME
51 55
52 # Do that because store.scm calls `canonicalize-path' on it. 56 # Do that because store.scm calls `canonicalize-path' on it.
53 mkdir -p "$NIX_STORE_DIR" 57 mkdir -p "$NIX_STORE_DIR"