set -e -o pipefail source common.sh test -n "$TEST_ROOT" if test -d "$TEST_ROOT"; then chmod -R u+w "$TEST_ROOT" # We would delete any daemon socket, so let's stop the daemon first. if [[ -n "${NIX_DAEMON_PACKAGE:-}" ]]; then killDaemon fi rm -rf "$TEST_ROOT" fi mkdir "$TEST_ROOT" mkdir "$NIX_STORE_DIR" mkdir "$NIX_LOCALSTATE_DIR" mkdir -p "$NIX_LOG_DIR"/drvs mkdir "$NIX_STATE_DIR" mkdir "$NIX_CONF_DIR" cat > "$NIX_CONF_DIR"/nix.conf < "$NIX_CONF_DIR"/nix.conf.extra <