---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "hardware",
         position: (6, 16),
        },
        Raw {
         content: "sane",
         position: (6, 25),
        },
        Raw {
         content: "brscan4",
         position: (6, 30),
        },
       ],
      },
      default: None,
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "netDeviceList",
        position: (8, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: Variable {
       identifier: "attrValues",
       position: (8, 19),
      },
      arguments: [
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (8, 30),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "netDevices",
           position: (8, 34),
          },
         ],
        },
        default: None,
       },
      ],
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "etcFiles",
        position: (10, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (10, 14),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "callPackage",
          position: (10, 19),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Path {
        parts: [
         Raw {
          content: "./brscan4_etc_files.nix",
          position: (10, 31),
         },
        ],
        position: (10, 31),
       },
       Map {
        bindings: [
         Binding {
          from: AttributePath {
           parts: [
            Raw {
             content: "netDevices",
             position: (10, 57),
            },
           ],
          },
          to: Variable {
           identifier: "netDeviceList",
           position: (10, 70),
          },
         },
        ],
        recursive: false,
        position: (10, 55),
       },
      ],
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "netDeviceOpts",
        position: (12, 3),
       },
      ],
     },
     to: Function {
      argument: Destructured {
       identifier: None,
       arguments: [
        DestructuredArgument {
         identifier: "name",
         default: None,
        },
       ],
       ellipsis: true,
      },
      definition: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "options",
            position: (14, 5),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "name",
               position: (16, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (16, 14),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (17, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (17, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "str",
                     position: (17, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (18, 9),
                   },
                  ],
                 },
                 to: 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),
                   },
                  ],
                  position: (18, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (23, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "office1",
                    position: (23, 20),
                   },
                  ],
                  position: (23, 19),
                 },
                },
               ],
               recursive: false,
               position: (16, 23),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "model",
               position: (26, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 15),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (27, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (27, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "str",
                     position: (27, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (28, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "The model of the network device.\n",
                    position: (29, 1),
                   },
                  ],
                  position: (28, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (32, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "MFC-7860DW",
                    position: (32, 20),
                   },
                  ],
                  position: (32, 19),
                 },
                },
               ],
               recursive: false,
               position: (26, 24),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ip",
               position: (35, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (35, 12),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (36, 9),
                   },
                  ],
                 },
                 to: 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),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (37, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "null",
                  position: (37, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (38, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "The ip address of the device. If undefined, you will have to\nprovide a nodename.\n",
                    position: (39, 1),
                   },
                  ],
                  position: (38, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (43, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "192.168.1.2",
                    position: (43, 20),
                   },
                  ],
                  position: (43, 19),
                 },
                },
               ],
               recursive: false,
               position: (35, 21),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "nodename",
               position: (46, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (46, 18),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (47, 9),
                   },
                  ],
                 },
                 to: 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),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (48, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "null",
                  position: (48, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (49, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "The node name of the device. If undefined, you will have to\nprovide an ip.\n",
                    position: (50, 1),
                   },
                  ],
                  position: (49, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (54, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "BRW0080927AFBCE",
                    position: (54, 20),
                   },
                  ],
                  position: (54, 19),
                 },
                },
               ],
               recursive: false,
               position: (46, 27),
              },
             ],
            },
           },
          ],
          recursive: false,
          position: (14, 15),
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "config",
            position: (60, 5),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "name",
               position: (61, 9),
              },
             ],
            },
            to: 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: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (68, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "hardware",
            position: (70, 5),
           },
           Raw {
            content: "sane",
            position: (70, 14),
           },
           Raw {
            content: "brscan4",
            position: (70, 19),
           },
           Raw {
            content: "enable",
            position: (70, 27),
           },
          ],
         },
         to: 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),
               },
              ],
              position: (71, 22),
             },
            ],
           },
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (72, 7),
                },
               ],
              },
              to: 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),
                },
               ],
               position: (72, 21),
              },
             },
            ],
            recursive: false,
            position: (71, 58),
           },
          ],
          position: (71, 55),
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "hardware",
            position: (78, 5),
           },
           Raw {
            content: "sane",
            position: (78, 14),
           },
           Raw {
            content: "brscan4",
            position: (78, 19),
           },
           Raw {
            content: "netDevices",
            position: (78, 27),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (78, 40),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (79, 7),
                },
               ],
              },
              to: Map {
               bindings: [],
               recursive: false,
               position: (79, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "example",
                 position: (80, 7),
                },
               ],
              },
              to: Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "office1",
                    position: (81, 11),
                   },
                  ],
                 },
                 to: Map {
                  bindings: [
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "model",
                       position: (81, 23),
                      },
                     ],
                    },
                    to: String {
                     parts: [
                      Raw {
                       content: "MFC-7860DW",
                       position: (81, 32),
                      },
                     ],
                     position: (81, 31),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "ip",
                       position: (81, 45),
                      },
                     ],
                    },
                    to: String {
                     parts: [
                      Raw {
                       content: "192.168.1.2",
                       position: (81, 51),
                      },
                     ],
                     position: (81, 50),
                    },
                   },
                  ],
                  recursive: false,
                  position: (81, 21),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "office2",
                    position: (82, 11),
                   },
                  ],
                 },
                 to: Map {
                  bindings: [
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "model",
                       position: (82, 23),
                      },
                     ],
                    },
                    to: String {
                     parts: [
                      Raw {
                       content: "MFC-7860DW",
                       position: (82, 32),
                      },
                     ],
                     position: (82, 31),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "nodename",
                       position: (82, 45),
                      },
                     ],
                    },
                    to: String {
                     parts: [
                      Raw {
                       content: "BRW0080927AFBCE",
                       position: (82, 57),
                      },
                     ],
                     position: (82, 56),
                    },
                   },
                  ],
                  recursive: false,
                  position: (82, 21),
                 },
                },
               ],
               recursive: false,
               position: (81, 9),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (84, 7),
                },
               ],
              },
              to: With {
               expression: Variable {
                identifier: "types",
                position: (84, 19),
               },
               target: FunctionApplication {
                function: Variable {
                 identifier: "attrsOf",
                 position: (84, 26),
                },
                arguments: [
                 Parentheses {
                  expression: FunctionApplication {
                   function: Variable {
                    identifier: "submodule",
                    position: (84, 35),
                   },
                   arguments: [
                    Variable {
                     identifier: "netDeviceOpts",
                     position: (84, 45),
                    },
                   ],
                  },
                  position: (84, 34),
                 },
                ],
               },
               position: (84, 14),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (85, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "The list of network devices that will be registered against the brscan4\nsane backend.\n",
                 position: (86, 1),
                },
               ],
               position: (85, 21),
              },
             },
            ],
            recursive: false,
            position: (78, 49),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (68, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (92, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (92, 12),
       },
       arguments: [
        Parentheses {
         expression: BinaryOperation {
          operator: LogicalAnd,
          operands: [
           PropertyAccess {
            expression: Variable {
             identifier: "config",
             position: (92, 18),
            },
            attribute_path: AttributePath {
             parts: [
              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 {
             parts: [
              Raw {
               content: "enable",
               position: (92, 53),
              },
             ],
            },
            default: None,
           },
          ],
          position: (92, 46),
         },
         position: (92, 17),
        },
        Map {
         bindings: [
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "hardware",
              position: (94, 5),
             },
             Raw {
              content: "sane",
              position: (94, 14),
             },
             Raw {
              content: "extraBackends",
              position: (94, 19),
             },
            ],
           },
           to: List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (95, 7),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "brscan4",
                 position: (95, 12),
                },
               ],
              },
              default: None,
             },
            ],
            position: (94, 35),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             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),
                },
               ],
               position: (98, 21),
              },
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "source",
                 position: (99, 9),
                },
               ],
              },
              to: String {
               parts: [
                Expression {
                 expression: Variable {
                  identifier: "etcFiles",
                  position: (99, 21),
                 },
                },
                Raw {
                 content: "/etc/opt/brother/scanner/brscan4",
                 position: (99, 30),
                },
               ],
               position: (99, 18),
              },
             },
            ],
            recursive: false,
            position: (99, 7),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "assertions",
              position: (101, 5),
             },
            ],
           },
           to: List {
            elements: [
             Map {
              bindings: [
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "assertion",
                   position: (102, 9),
                  },
                 ],
                },
                to: FunctionApplication {
                 function: Variable {
                  identifier: "all",
                  position: (102, 21),
                 },
                 arguments: [
                  Parentheses {
                   expression: Function {
                    argument: Simple {
                     identifier: "x",
                    },
                    definition: UnaryOperation {
                     operator: Not,
                     operand: Parentheses {
                      expression: 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 {
                            parts: [
                             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 {
                            parts: [
                             Raw {
                              content: "nodename",
                              position: (102, 57),
                             },
                            ],
                           },
                           default: None,
                          },
                         ],
                         position: (102, 52),
                        },
                       ],
                       position: (102, 44),
                      },
                      position: (102, 30),
                     },
                     position: (102, 29),
                    },
                    position: (102, 26),
                   },
                   position: (102, 25),
                  },
                  Variable {
                   identifier: "netDeviceList",
                   position: (102, 68),
                  },
                 ],
                },
               },
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "message",
                   position: (103, 9),
                  },
                 ],
                },
                to: 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),
                  },
                 ],
                 position: (103, 19),
                },
               },
              ],
              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),
}