2021-07-15 16:17:18 +00:00
|
|
|
source common.sh
|
|
|
|
|
|
|
|
replCmds="
|
|
|
|
simple = import ./simple.nix
|
|
|
|
:b simple
|
|
|
|
"
|
|
|
|
|
|
|
|
testRepl () {
|
|
|
|
local nixArgs=("$@")
|
2021-11-03 09:54:17 +00:00
|
|
|
local replOutput="$(nix repl "${nixArgs[@]}" <<< "$replCmds")"
|
|
|
|
echo "$replOutput"
|
|
|
|
local outPath=$(echo "$replOutput" |&
|
2021-07-15 16:17:18 +00:00
|
|
|
grep -o -E "$NIX_STORE_DIR/\w*-simple")
|
|
|
|
nix path-info "${nixArgs[@]}" "$outPath"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Simple test, try building a drv
|
|
|
|
testRepl
|
|
|
|
# Same thing (kind-of), but with a remote store.
|
|
|
|
testRepl --store "$TEST_ROOT/store?real=$NIX_STORE_DIR"
|