nix-super/tests/functional/flakes/absolute-attr-paths.sh
John Ericson 10f864c5ae Ensure all functional scripts are (a) executable (b) have shebang
This is good for shebang, and also good for future build system
simplifications
2024-05-28 12:46:24 -04:00

19 lines
390 B
Bash
Executable file

#!/usr/bin/env bash
source ./common.sh
flake1Dir=$TEST_ROOT/flake1
mkdir -p $flake1Dir
cat > $flake1Dir/flake.nix <<EOF
{
outputs = { self }: {
x = 1;
packages.$system.x = 2;
};
}
EOF
[ "$(nix eval --impure --json $flake1Dir#.x)" -eq 1 ]
[ "$(nix eval --impure --json $flake1Dir#x)" -eq 2 ]
[ "$(nix eval --impure --json $flake1Dir#.packages.$system.x)" -eq 2 ]