---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (2, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (4, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (4, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "hardware",
         position: (4, 16),
        },
        Raw {
         content: "cpu",
         position: (4, 25),
        },
        Raw {
         content: "intel",
         position: (4, 29),
        },
        Raw {
         content: "sgx",
         position: (4, 35),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "defaultPrvGroup",
        position: (5, 3),
       },
      ],
     },
     String {
      parts: [
       Raw {
        content: "sgx_prv",
        position: (5, 22),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (8, 3),
        },
        Raw {
         content: "hardware",
         position: (8, 11),
        },
        Raw {
         content: "cpu",
         position: (8, 20),
        },
        Raw {
         content: "intel",
         position: (8, 24),
        },
        Raw {
         content: "sgx",
         position: (8, 30),
        },
        Raw {
         content: "enableDcapCompat",
         position: (8, 34),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkOption",
        position: (8, 53),
       },
       arguments: [
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "description",
              position: (9, 5),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "Whether to enable backward compatibility for SGX software build for the\nout-of-tree Intel SGX DCAP driver.\n\nCreates symbolic links for the SGX devices <literal>/dev/sgx_enclave</literal>\nand <literal>/dev/sgx_provision</literal> to make them available as\n<literal>/dev/sgx/enclave</literal>  and <literal>/dev/sgx/provision</literal>,\nrespectively.\n",
              position: (10, 1),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "type",
              position: (18, 5),
             },
            ],
           },
           PropertyAccess {
            expression: Variable {
             identifier: "types",
             position: (18, 12),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "bool",
               position: (18, 18),
              },
             ],
            },
            default: None,
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "default",
              position: (19, 5),
             },
            ],
           },
           Variable {
            identifier: "true",
            position: (19, 15),
           },
          ),
         ],
         recursive: false,
         position: (8, 62),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (22, 3),
        },
        Raw {
         content: "hardware",
         position: (22, 11),
        },
        Raw {
         content: "cpu",
         position: (22, 20),
        },
        Raw {
         content: "intel",
         position: (22, 24),
        },
        Raw {
         content: "sgx",
         position: (22, 30),
        },
        Raw {
         content: "provision",
         position: (22, 34),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (23, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (23, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "access to the Intel SGX provisioning device",
              position: (23, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "user",
            position: (24, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (24, 12),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (25, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Owner to assign to the SGX provisioning device.",
                 position: (25, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (26, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (26, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (26, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (27, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "root",
                 position: (27, 18),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (24, 21),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "group",
            position: (29, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (29, 13),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (30, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Group to assign to the SGX provisioning device.",
                 position: (30, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (31, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (31, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (31, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (32, 7),
                },
               ],
              },
              Variable {
               identifier: "defaultPrvGroup",
               position: (32, 17),
              },
             ),
            ],
            recursive: false,
            position: (29, 22),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "mode",
            position: (34, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (34, 12),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (35, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Mode to set for the SGX provisioning device.",
                 position: (35, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (36, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (36, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (36, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (37, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "0660",
                 position: (37, 18),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (34, 21),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (22, 46),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (41, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkMerge",
        position: (41, 12),
       },
       arguments: [
        List {
         elements: [
          FunctionApplication {
           function: Variable {
            identifier: "mkIf",
            position: (42, 6),
           },
           arguments: [
            PropertyAccess {
             expression: Variable {
              identifier: "cfg",
              position: (42, 11),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "provision",
                position: (42, 15),
               },
               Raw {
                content: "enable",
                position: (42, 25),
               },
              ],
             },
             default: None,
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "assertions",
                  position: (43, 7),
                 },
                ],
               },
               List {
                elements: [
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "assertion",
                       position: (45, 11),
                      },
                     ],
                    },
                    FunctionApplication {
                     function: Variable {
                      identifier: "hasAttr",
                      position: (45, 23),
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (45, 31),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "provision",
                          position: (45, 35),
                         },
                         Raw {
                          content: "user",
                          position: (45, 45),
                         },
                        ],
                       },
                       default: None,
                      },
                      PropertyAccess {
                       expression: Variable {
                        identifier: "config",
                        position: (45, 50),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "users",
                          position: (45, 57),
                         },
                         Raw {
                          content: "users",
                          position: (45, 63),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "message",
                       position: (46, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "Given user does not exist",
                       position: (46, 22),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (44, 9),
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "assertion",
                       position: (49, 11),
                      },
                     ],
                    },
                    BinaryOperation {
                     operator: LogicalOr,
                     operands: [
                      BinaryOperation {
                       operator: EqualTo,
                       operands: [
                        PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (49, 24),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "provision",
                            position: (49, 28),
                           },
                           Raw {
                            content: "group",
                            position: (49, 38),
                           },
                          ],
                         },
                         default: None,
                        },
                        Variable {
                         identifier: "defaultPrvGroup",
                         position: (49, 47),
                        },
                       ],
                       position: (49, 44),
                      },
                      FunctionApplication {
                       function: Variable {
                        identifier: "hasAttr",
                        position: (49, 68),
                       },
                       arguments: [
                        PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (49, 76),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "provision",
                            position: (49, 80),
                           },
                           Raw {
                            content: "group",
                            position: (49, 90),
                           },
                          ],
                         },
                         default: None,
                        },
                        PropertyAccess {
                         expression: Variable {
                          identifier: "config",
                          position: (49, 96),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "users",
                            position: (49, 103),
                           },
                           Raw {
                            content: "groups",
                            position: (49, 109),
                           },
                          ],
                         },
                         default: None,
                        },
                       ],
                      },
                     ],
                     position: (49, 64),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "message",
                       position: (50, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "Given group does not exist",
                       position: (50, 22),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (48, 9),
                 },
                ],
                position: (43, 20),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "users",
                  position: (54, 7),
                 },
                 Raw {
                  content: "groups",
                  position: (54, 13),
                 },
                ],
               },
               FunctionApplication {
                function: Variable {
                 identifier: "optionalAttrs",
                 position: (54, 22),
                },
                arguments: [
                 BinaryOperation {
                  operator: EqualTo,
                  operands: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (54, 37),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "provision",
                       position: (54, 41),
                      },
                      Raw {
                       content: "group",
                       position: (54, 51),
                      },
                     ],
                    },
                    default: None,
                   },
                   Variable {
                    identifier: "defaultPrvGroup",
                    position: (54, 60),
                   },
                  ],
                  position: (54, 57),
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Expression {
                       expression: String {
                        parts: [
                         Expression {
                          expression: PropertyAccess {
                           expression: Variable {
                            identifier: "cfg",
                            position: (55, 12),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "provision",
                              position: (55, 16),
                             },
                             Raw {
                              content: "group",
                              position: (55, 26),
                             },
                            ],
                           },
                           default: None,
                          },
                         },
                        ],
                       },
                      },
                     ],
                    },
                    Map {
                     bindings: [],
                     recursive: false,
                     position: (55, 36),
                    },
                   ),
                  ],
                  recursive: false,
                  position: (54, 77),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "services",
                  position: (58, 7),
                 },
                 Raw {
                  content: "udev",
                  position: (58, 16),
                 },
                 Raw {
                  content: "extraRules",
                  position: (58, 21),
                 },
                ],
               },
               With {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (58, 39),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "provision",
                    position: (58, 43),
                   },
                  ],
                 },
                 default: None,
                },
                target: String {
                 parts: [
                  Raw {
                   content: "SUBSYSTEM==\"misc\", KERNEL==\"sgx_provision\", OWNER=\"",
                   position: (59, 1),
                  },
                  Expression {
                   expression: Variable {
                    identifier: "user",
                    position: (59, 62),
                   },
                  },
                  Raw {
                   content: "\", GROUP=\"",
                   position: (59, 67),
                  },
                  Expression {
                   expression: Variable {
                    identifier: "group",
                    position: (59, 79),
                   },
                  },
                  Raw {
                   content: "\", MODE=\"",
                   position: (59, 85),
                  },
                  Expression {
                   expression: Variable {
                    identifier: "mode",
                    position: (59, 96),
                   },
                  },
                  Raw {
                   content: "\"\n",
                   position: (59, 101),
                  },
                 ],
                },
                position: (58, 34),
               },
              ),
             ],
             recursive: false,
             position: (42, 32),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "mkIf",
            position: (62, 6),
           },
           arguments: [
            PropertyAccess {
             expression: Variable {
              identifier: "cfg",
              position: (62, 11),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "enableDcapCompat",
                position: (62, 15),
               },
              ],
             },
             default: None,
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "services",
                  position: (63, 7),
                 },
                 Raw {
                  content: "udev",
                  position: (63, 16),
                 },
                 Raw {
                  content: "extraRules",
                  position: (63, 21),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "SUBSYSTEM==\"misc\", KERNEL==\"sgx_enclave\",   SYMLINK+=\"sgx/enclave\"\nSUBSYSTEM==\"misc\", KERNEL==\"sgx_provision\", SYMLINK+=\"sgx/provision\"\n",
                  position: (64, 1),
                 },
                ],
               },
              ),
             ],
             recursive: false,
             position: (62, 32),
            },
           ],
          },
         ],
         position: (41, 20),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (7, 1),
   },
   position: (3, 1),
  },
  position: (2, 1),
 },
 position: (1, 1),
}