brewery
notashelf /
5e41a7cb370f9334859d7e2ebd56507b751f6a13

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git
tests/inherit.nixNix20 lines248 B
1
# Test inherit keyword
2
let
3
  x = 10;
4
  y = 20;
5
  attrs = {
6
    a = 1;
7
    b = 2;
8
    c = 3;
9
  };
10
in {
11
  # Basic inherit from outer scope
12
  inherit x y;
13
14
  # Inherit from expression
15
  inherit (attrs) a b;
16
17
  # Mixed
18
  z = 30;
19
  inherit (attrs) c;
20
}