---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "hardware",
         position: (6, 16),
        },
        Raw {
         content: "sane",
         position: (6, 25),
        },
        Raw {
         content: "brscan4",
         position: (6, 30),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "netDeviceList",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "attrValues",
       position: (8, 19),
      },
      arguments: [
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (8, 30),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "netDevices",
           position: (8, 34),
          },
         ],
        },
        default: None,
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "etcFiles",
        position: (10, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (10, 14),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "callPackage",
          position: (10, 19),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Path {
        parts: [
         Raw {
          content: "./brscan4_etc_files.nix",
          position: (10, 31),
         },
        ],
       },
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "netDevices",
             position: (10, 57),
            },
           ],
          },
          Variable {
           identifier: "netDeviceList",
           position: (10, 70),
          },
         ),
        ],
        recursive: false,
        position: (10, 55),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "netDeviceOpts",
        position: (12, 3),
       },
      ],
     },
     Function {
      argument: None,
      arguments: FunctionArguments {
       arguments: [
        FunctionArgument {
         identifier: "name",
         default: None,
        },
       ],
       ellipsis: true,
      },
      definition: Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "options",
            position: (14, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "name",
               position: (16, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (16, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (17, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (17, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (17, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (18, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The friendly name you give to the network device. If undefined,\nthe name of attribute will be used.\n",
                    position: (19, 1),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "office1",
                    position: (23, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (16, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "model",
               position: (26, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 15),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (27, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (27, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (27, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (28, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The model of the network device.\n",
                    position: (29, 1),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (32, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "MFC-7860DW",
                    position: (32, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (26, 24),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ip",
               position: (35, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (35, 12),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (36, 9),
                   },
                  ],
                 },
                 With {
                  expression: Variable {
                   identifier: "types",
                   position: (36, 21),
                  },
                  target: FunctionApplication {
                   function: Variable {
                    identifier: "nullOr",
                    position: (36, 28),
                   },
                   arguments: [
                    Variable {
                     identifier: "str",
                     position: (36, 35),
                    },
                   ],
                  },
                  position: (36, 16),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (37, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "null",
                  position: (37, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (38, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The ip address of the device. If undefined, you will have to\nprovide a nodename.\n",
                    position: (39, 1),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (43, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "192.168.1.2",
                    position: (43, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (35, 21),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "nodename",
               position: (46, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (46, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (47, 9),
                   },
                  ],
                 },
                 With {
                  expression: Variable {
                   identifier: "types",
                   position: (47, 21),
                  },
                  target: FunctionApplication {
                   function: Variable {
                    identifier: "nullOr",
                    position: (47, 28),
                   },
                   arguments: [
                    Variable {
                     identifier: "str",
                     position: (47, 35),
                    },
                   ],
                  },
                  position: (47, 16),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (48, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "null",
                  position: (48, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (49, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The node name of the device. If undefined, you will have to\nprovide an ip.\n",
                    position: (50, 1),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (54, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "BRW0080927AFBCE",
                    position: (54, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (46, 27),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (14, 15),
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "config",
            position: (60, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "name",
               position: (61, 9),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkDefault",
              position: (61, 16),
             },
             arguments: [
              Variable {
               identifier: "name",
               position: (61, 26),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (61, 7),
         },
        ),
       ],
       recursive: false,
       position: (12, 34),
      },
      position: (12, 19),
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (68, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "hardware",
            position: (70, 5),
           },
           Raw {
            content: "sane",
            position: (70, 14),
           },
           Raw {
            content: "brscan4",
            position: (70, 19),
           },
           Raw {
            content: "enable",
            position: (70, 27),
           },
          ],
         },
         BinaryOperation {
          operator: Update,
          operands: [
           FunctionApplication {
            function: Variable {
             identifier: "mkEnableOption",
             position: (71, 7),
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: "Brother's brscan4 scan backend",
                position: (71, 23),
               },
              ],
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (72, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "When enabled, will automatically register the \"brscan4\" sane\nbackend and bring configuration files to their expected location.\n",
                 position: (73, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (71, 58),
           },
          ],
          position: (71, 55),
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "hardware",
            position: (78, 5),
           },
           Raw {
            content: "sane",
            position: (78, 14),
           },
           Raw {
            content: "brscan4",
            position: (78, 19),
           },
           Raw {
            content: "netDevices",
            position: (78, 27),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (78, 40),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (79, 7),
                },
               ],
              },
              Map {
               bindings: [],
               recursive: false,
               position: (79, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (80, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "office1",
                    position: (81, 11),
                   },
                  ],
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "model",
                       position: (81, 23),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "MFC-7860DW",
                       position: (81, 32),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "ip",
                       position: (81, 45),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "192.168.1.2",
                       position: (81, 51),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (81, 21),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "office2",
                    position: (82, 11),
                   },
                  ],
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "model",
                       position: (82, 23),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "MFC-7860DW",
                       position: (82, 32),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "nodename",
                       position: (82, 45),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "BRW0080927AFBCE",
                       position: (82, 57),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (82, 21),
                 },
                ),
               ],
               recursive: false,
               position: (81, 9),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (84, 7),
                },
               ],
              },
              With {
               expression: Variable {
                identifier: "types",
                position: (84, 19),
               },
               target: FunctionApplication {
                function: Variable {
                 identifier: "attrsOf",
                 position: (84, 26),
                },
                arguments: [
                 FunctionApplication {
                  function: Variable {
                   identifier: "submodule",
                   position: (84, 35),
                  },
                  arguments: [
                   Variable {
                    identifier: "netDeviceOpts",
                    position: (84, 45),
                   },
                  ],
                 },
                ],
               },
               position: (84, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (85, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The list of network devices that will be registered against the brscan4\nsane backend.\n",
                 position: (86, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (78, 49),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (68, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (92, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (92, 12),
       },
       arguments: [
        BinaryOperation {
         operator: LogicalAnd,
         operands: [
          PropertyAccess {
           expression: Variable {
            identifier: "config",
            position: (92, 18),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "hardware",
              position: (92, 25),
             },
             Raw {
              content: "sane",
              position: (92, 34),
             },
             Raw {
              content: "enable",
              position: (92, 39),
             },
            ],
           },
           default: None,
          },
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (92, 49),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "enable",
              position: (92, 53),
             },
            ],
           },
           default: None,
          },
         ],
         position: (92, 46),
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "hardware",
              position: (94, 5),
             },
             Raw {
              content: "sane",
              position: (94, 14),
             },
             Raw {
              content: "extraBackends",
              position: (94, 19),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (95, 7),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "brscan4",
                 position: (95, 12),
                },
               ],
              },
              default: None,
             },
            ],
            position: (94, 35),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (98, 5),
             },
             Raw {
              content: "etc",
              position: (98, 17),
             },
             Expression {
              expression: String {
               parts: [
                Raw {
                 content: "opt/brother/scanner/brscan4",
                 position: (98, 22),
                },
               ],
              },
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "source",
                 position: (99, 9),
                },
               ],
              },
              String {
               parts: [
                Expression {
                 expression: Variable {
                  identifier: "etcFiles",
                  position: (99, 21),
                 },
                },
                Raw {
                 content: "/etc/opt/brother/scanner/brscan4",
                 position: (99, 30),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (99, 7),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "assertions",
              position: (101, 5),
             },
            ],
           },
           List {
            elements: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "assertion",
                   position: (102, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "all",
                  position: (102, 21),
                 },
                 arguments: [
                  Function {
                   argument: Some(
                    "x",
                   ),
                   arguments: FunctionArguments {
                    arguments: [],
                    ellipsis: false,
                   },
                   definition: UnaryOperation {
                    operator: Not,
                    operand: BinaryOperation {
                     operator: LogicalAnd,
                     operands: [
                      BinaryOperation {
                       operator: NotEqualTo,
                       operands: [
                        Variable {
                         identifier: "null",
                         position: (102, 31),
                        },
                        PropertyAccess {
                         expression: Variable {
                          identifier: "x",
                          position: (102, 39),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "ip",
                            position: (102, 41),
                           },
                          ],
                         },
                         default: None,
                        },
                       ],
                       position: (102, 36),
                      },
                      BinaryOperation {
                       operator: NotEqualTo,
                       operands: [
                        Variable {
                         identifier: "null",
                         position: (102, 47),
                        },
                        PropertyAccess {
                         expression: Variable {
                          identifier: "x",
                          position: (102, 55),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "nodename",
                            position: (102, 57),
                           },
                          ],
                         },
                         default: None,
                        },
                       ],
                       position: (102, 52),
                      },
                     ],
                     position: (102, 44),
                    },
                    position: (102, 29),
                   },
                   position: (102, 26),
                  },
                  Variable {
                   identifier: "netDeviceList",
                   position: (102, 68),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "message",
                   position: (103, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "When describing a network device as part of the attribute list\n`hardware.sane.brscan4.netDevices`, only one of its `ip` or `nodename`\nattribute should be specified, not both!\n",
                   position: (104, 1),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (102, 7),
             },
            ],
            position: (101, 18),
           },
          ),
         ],
         recursive: false,
         position: (92, 61),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (67, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}