mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
flakes: adopt repl-flake behavior as default
This commit is contained in:
parent
ea2fa8b6f3
commit
13ed5d7106
5 changed files with 9 additions and 10 deletions
|
@ -105,18 +105,13 @@ testReplResponseNoRegex '
|
|||
testReplResponse '
|
||||
drvPath
|
||||
' '".*-simple.drv"' \
|
||||
$testDir/simple.nix
|
||||
--file $testDir/simple.nix
|
||||
|
||||
testReplResponse '
|
||||
drvPath
|
||||
' '".*-simple.drv"' \
|
||||
--file $testDir/simple.nix --experimental-features 'ca-derivations'
|
||||
|
||||
testReplResponse '
|
||||
drvPath
|
||||
' '".*-simple.drv"' \
|
||||
--file $testDir/simple.nix --extra-experimental-features 'repl-flake ca-derivations'
|
||||
|
||||
mkdir -p flake && cat <<EOF > flake/flake.nix
|
||||
{
|
||||
outputs = { self }: {
|
||||
|
@ -130,7 +125,7 @@ EOF
|
|||
testReplResponse '
|
||||
foo + baz
|
||||
' "3" \
|
||||
./flake ./flake\#bar --experimental-features 'flakes repl-flake'
|
||||
./flake ./flake\#bar --experimental-features 'flakes'
|
||||
|
||||
# Test the `:reload` mechansim with flakes:
|
||||
# - Eval `./flake#changingThing`
|
||||
|
@ -143,7 +138,7 @@ sleep 1 # Leave the repl the time to eval 'foo'
|
|||
sed -i 's/beforeChange/afterChange/' flake/flake.nix
|
||||
echo ":reload"
|
||||
echo "changingThing"
|
||||
) | nix repl ./flake --experimental-features 'flakes repl-flake')
|
||||
) | nix repl ./flake --experimental-features 'flakes')
|
||||
echo "$replResult" | grepQuiet -s beforeChange
|
||||
echo "$replResult" | grepQuiet -s afterChange
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue