summaryrefslogtreecommitdiff
path: root/srv-dev-env.sh
blob: d41a96d6f8acf1bc1fce5427ffc114a75f07bf18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

test_dir="$(mktemp -d)"
trap "rm -rf $test_dir" EXIT

mkdir -p "$test_dir"/run
mkdir -p "$test_dir"/data

test_cfg="(import ./config.nix) // {
    runDir=\"${test_dir}/run\";
    dataDir=\"${test_dir}/data\";
}"

nix-shell -A srv.shell \
    --arg config "$test_cfg" \
    "$@"