about summary refs log tree commit diff
path: root/third_party/nix/scripts/setup_store.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/scripts/setup_store.sh')
-rwxr-xr-xthird_party/nix/scripts/setup_store.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/nix/scripts/setup_store.sh b/third_party/nix/scripts/setup_store.sh
new file mode 100755
index 000000000000..ee96c8d3b853
--- /dev/null
+++ b/third_party/nix/scripts/setup_store.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# Setup a store for local development rooted at the current directory, and
+# compatible with the scripts in this directory (repl.sh, build.sh, eval.sh,
+# daemon.sh, etc). Intended to be run from the cmake build directory
+
+mkdir -p nix/store nix/var/nix nix/var/log/nix
+ln -s $(pwd)/src/nix ./nix/build-remote
+mkdir -p $(dirname "$(pwd)${SANDBOX_SHELL}")
+cp "${SANDBOX_SHELL}" "$(pwd)${SANDBOX_SHELL}"