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

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 shell --arg config "$test_cfg" "$@"