2006-03-01 14:15:33 +02:00
|
|
|
source common.sh
|
|
|
|
|
2004-06-18 21:09:32 +03:00
|
|
|
echo "NIX_STORE_DIR=$NIX_STORE_DIR NIX_DB_DIR=$NIX_DB_DIR"
|
|
|
|
|
2004-05-04 15:15:30 +03:00
|
|
|
test -n "$TEST_ROOT"
|
|
|
|
if test -d "$TEST_ROOT"; then
|
|
|
|
chmod -R u+w "$TEST_ROOT"
|
|
|
|
rm -rf "$TEST_ROOT"
|
|
|
|
fi
|
|
|
|
mkdir "$TEST_ROOT"
|
|
|
|
|
|
|
|
mkdir "$NIX_STORE_DIR"
|
2005-02-01 19:50:48 +02:00
|
|
|
mkdir "$NIX_LOCALSTATE_DIR"
|
2005-02-18 10:40:52 +02:00
|
|
|
mkdir -p "$NIX_LOG_DIR"/drvs
|
2004-05-04 15:15:30 +03:00
|
|
|
mkdir "$NIX_STATE_DIR"
|
|
|
|
mkdir "$NIX_DB_DIR"
|
2005-02-15 11:39:12 +02:00
|
|
|
mkdir "$NIX_CONF_DIR"
|
2004-05-04 15:15:30 +03:00
|
|
|
|
2005-02-15 11:39:12 +02:00
|
|
|
cat > "$NIX_CONF_DIR"/nix.conf <<EOF
|
2014-05-02 20:02:10 +03:00
|
|
|
build-users-group =
|
2005-02-15 11:39:12 +02:00
|
|
|
gc-keep-outputs = false
|
|
|
|
gc-keep-derivations = false
|
|
|
|
env-keep-derivations = false
|
2010-02-24 15:12:57 +02:00
|
|
|
fsync-metadata = false
|
2005-02-15 11:39:12 +02:00
|
|
|
EOF
|
|
|
|
|
2004-05-04 15:15:30 +03:00
|
|
|
# Initialise the database.
|
2011-10-11 00:32:34 +03:00
|
|
|
nix-store --init
|
2004-05-04 15:15:30 +03:00
|
|
|
|
|
|
|
# Did anything happen?
|
2010-02-18 18:51:27 +02:00
|
|
|
test -e "$NIX_DB_DIR"/db.sqlite
|
2008-12-03 18:15:38 +02:00
|
|
|
|
|
|
|
echo 'Hello World' > ./dummy
|