brewery
notashelf /
e8fcaccacca58cacc6c7ad1e395da5d6d664fb51

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git
tests/indented_string.nixNix31 lines533 B
1
# Test indented strings (multi-line strings with '' delimiters)
2
let
3
  # Simple indented string
4
  simple = ''
5
    Hello
6
    World
7
  '';
8
9
  # Indented string with interpolation
10
  name = "Nix";
11
  greeting = ''
12
    Welcome to ${name}!
13
    This is indented.
14
  '';
15
16
  # Escape sequences
17
  escapes = ''
18
    Literal dollar: ''$
19
    Literal quotes: '''
20
    Regular text
21
  '';
22
23
  # Shell script example (common use case)
24
  script = ''
25
    #!/bin/bash
26
    echo "Running script"
27
    ls -la
28
  '';
29
in {
30
  inherit simple greeting escapes script;
31
}