87f9c27ba9
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
14 lines
381 B
Nix
14 lines
381 B
Nix
{ lib, writeShellScript }: let
|
|
output = "hello";
|
|
in (writeShellScript "test-script" ''
|
|
echo ${lib.escapeShellArg output}
|
|
'').overrideAttrs (old: {
|
|
checkPhase = old.checkPhase or "" + ''
|
|
expected=${lib.escapeShellArg output}
|
|
got=$("$target")
|
|
if [[ "$got" != "$expected" ]]; then
|
|
echo "wrong output: expected $expected, got $got"
|
|
exit 1
|
|
fi
|
|
'';
|
|
})
|