Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9d6ce6a264780f215b1b57d947b5264c6a6a6964
31 lines
533 B
Nix
31 lines
533 B
Nix
# Test indented strings (multi-line strings with '' delimiters)
|
|
let
|
|
# Simple indented string
|
|
simple = ''
|
|
Hello
|
|
World
|
|
'';
|
|
|
|
# Indented string with interpolation
|
|
name = "Nix";
|
|
greeting = ''
|
|
Welcome to ${name}!
|
|
This is indented.
|
|
'';
|
|
|
|
# Escape sequences
|
|
escapes = ''
|
|
Literal dollar: ''$
|
|
Literal quotes: '''
|
|
Regular text
|
|
'';
|
|
|
|
# Shell script example (common use case)
|
|
script = ''
|
|
#!/bin/bash
|
|
echo "Running script"
|
|
ls -la
|
|
'';
|
|
in {
|
|
inherit simple greeting escapes script;
|
|
}
|