2006-03-01 13:15:33 +01:00
|
|
|
source common.sh
|
|
|
|
|
2004-05-04 14:15:30 +02: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 18:50:48 +01:00
|
|
|
mkdir "$NIX_LOCALSTATE_DIR"
|
2005-02-18 09:40:52 +01:00
|
|
|
mkdir -p "$NIX_LOG_DIR"/drvs
|
2004-05-04 14:15:30 +02:00
|
|
|
mkdir "$NIX_STATE_DIR"
|
2005-02-15 10:39:12 +01:00
|
|
|
mkdir "$NIX_CONF_DIR"
|
2004-05-04 14:15:30 +02:00
|
|
|
|
2005-02-15 10:39:12 +01:00
|
|
|
cat > "$NIX_CONF_DIR"/nix.conf <<EOF
|
2014-05-02 19:02:10 +02:00
|
|
|
build-users-group =
|
2017-08-31 14:28:25 +02:00
|
|
|
keep-derivations = false
|
2018-11-07 17:08:28 +01:00
|
|
|
sandbox = false
|
2019-10-16 17:45:09 +02:00
|
|
|
experimental-features = nix-command flakes
|
2018-02-13 14:16:32 +01:00
|
|
|
include nix.conf.extra
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > "$NIX_CONF_DIR"/nix.conf.extra <<EOF
|
2010-02-24 14:12:57 +01:00
|
|
|
fsync-metadata = false
|
2018-02-13 14:16:32 +01:00
|
|
|
!include nix.conf.extra.not-there
|
2005-02-15 10:39:12 +01:00
|
|
|
EOF
|
|
|
|
|
2004-05-04 14:15:30 +02:00
|
|
|
# Initialise the database.
|
2011-10-10 23:32:34 +02:00
|
|
|
nix-store --init
|
2004-05-04 14:15:30 +02:00
|
|
|
|
|
|
|
# Did anything happen?
|
2016-07-27 17:14:41 +02:00
|
|
|
test -e "$NIX_STATE_DIR"/db/db.sqlite
|
2008-12-03 17:15:38 +01:00
|
|
|
|
|
|
|
echo 'Hello World' > ./dummy
|