mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 09:06:15 +02:00
1a4c9ba50b
When running a `:b` command in the repl, after building the derivations query the store for its outputs rather than just assuming that they are known in the derivation itself (which isn’t true for CA derivations) Fix #5328
20 lines
486 B
Bash
20 lines
486 B
Bash
source common.sh
|
|
|
|
replCmds="
|
|
simple = import ./simple.nix
|
|
:b simple
|
|
"
|
|
|
|
testRepl () {
|
|
local nixArgs=("$@")
|
|
local replOutput="$(nix repl "${nixArgs[@]}" <<< "$replCmds")"
|
|
echo "$replOutput"
|
|
local outPath=$(echo "$replOutput" |&
|
|
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"
|