Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I70cd1dfa45add9df58a44add69fbd30a6a6a6964
19 lines
377 B
Nix
19 lines
377 B
Nix
# Test string interpolation
|
|
let
|
|
name = "world";
|
|
x = 42;
|
|
bool_val = true;
|
|
in
|
|
{
|
|
# Simple interpolation
|
|
greeting = "Hello ${name}!";
|
|
|
|
# Multiple interpolations
|
|
multi = "x is ${x} and name is ${name}";
|
|
|
|
# Nested expression
|
|
nested = "Result: ${if bool_val then "yes" else "no"}";
|
|
|
|
# Just a string (no interpolation)
|
|
plain = "plain text";
|
|
}
|