1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00
nix/tests/functional/flakes/debugger.sh
Sergei Zimmerman 0d5004508f tests/functional: Add flake-based regression for debugger use-after-free
This is the simplest reproducer I have. It would be great to find
a repro without flakes, but I guess this should be ok for now.
2025-02-21 14:36:39 +00:00

28 lines
411 B
Bash

#!/usr/bin/env bash
source ./common.sh
requireGit
flakeDir="$TEST_ROOT/flake"
createGitRepo "$flakeDir"
cat >"$flakeDir/flake.nix" <<EOF
{
inputs = {
};
outputs =
_:
let
in
{
packages.$system.default = throw "oh no";
};
}
EOF
git -C "$flakeDir" add flake.nix
# regression #12527 and #11286
echo ":env" | expect 1 nix eval "$flakeDir#packages.${system}.default" --debugger