mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Add --arg-from-stdin to read an argument from stdin
This commit is contained in:
parent
291b10c607
commit
8ce1f6800b
3 changed files with 16 additions and 1 deletions
|
@ -49,3 +49,6 @@ printf 123 > $TEST_ROOT/xyzzy/default.nix
|
|||
if [[ -e /proc/version ]]; then
|
||||
[[ "$(nix eval --raw --arg-from-file foo /proc/version --expr '{ foo }: { inherit foo; }' foo)" = "$(cat /proc/version)" ]]
|
||||
fi
|
||||
|
||||
# Test --arg-from-stdin.
|
||||
[[ "$(echo bla | nix eval --raw --arg-from-stdin foo --expr '{ foo }: { inherit foo; }' foo)" = bla ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue