brewery
notashelf /
e8fcaccacca58cacc6c7ad1e395da5d6d664fb51

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git
tests/integration/regression_normal_nix.nixNix39 lines608 B
1
# Test that normal Nix evaluation is not broken
2
# This file should work identically with or without the plugin
3
let
4
  # Basic arithmetic
5
  math = 1 + 2 * 3;
6
7
  # String operations
8
  str = "hello" + " " + "world";
9
10
  # List operations
11
  list = [1 2 3] ++ [4 5 6];
12
13
  # Attrset operations
14
  attrs =
15
    {
16
      a = 1;
17
      b = 2;
18
    }
19
    // {c = 3;};
20
21
  # Functions
22
  double = x: x * 2;
23
  result = double 21;
24
25
  # Conditionals
26
  cond =
27
    if true
28
    then "yes"
29
    else "no";
30
31
  # Let bindings
32
  nested = let
33
    x = 10;
34
    y = 20;
35
  in
36
    x + y;
37
in {
38
  inherit math str list attrs result cond nested;
39
}