---
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: "cfgFile",
        position: (6, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (6, 13),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "writeText",
          position: (6, 18),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "reader.conf",
          position: (6, 29),
         },
        ],
       },
       PropertyAccess {
        expression: Variable {
         identifier: "config",
         position: (6, 42),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "services",
           position: (6, 49),
          },
          Raw {
           content: "pcscd",
           position: (6, 58),
          },
          Raw {
           content: "readerConfig",
           position: (6, 64),
          },
         ],
        },
        default: None,
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "pluginEnv",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (8, 15),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "buildEnv",
          position: (8, 20),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "name",
             position: (9, 5),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: "pcscd-plugins",
             position: (9, 13),
            },
           ],
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "paths",
             position: (10, 5),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "map",
            position: (10, 13),
           },
           arguments: [
            Function {
             argument: Some(
              "p",
             ),
             arguments: FunctionArguments {
              arguments: [],
              ellipsis: false,
             },
             definition: String {
              parts: [
               Expression {
                expression: Variable {
                 identifier: "p",
                 position: (10, 24),
                },
               },
               Raw {
                content: "/pcsc/drivers",
                position: (10, 26),
               },
              ],
             },
             position: (10, 18),
            },
            PropertyAccess {
             expression: Variable {
              identifier: "config",
              position: (10, 42),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "services",
                position: (10, 49),
               },
               Raw {
                content: "pcscd",
                position: (10, 58),
               },
               Raw {
                content: "plugins",
                position: (10, 64),
               },
              ],
             },
             default: None,
            },
           ],
          },
         ),
        ],
        recursive: false,
        position: (8, 29),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (18, 3),
        },
        Raw {
         content: "services",
         position: (18, 11),
        },
        Raw {
         content: "pcscd",
         position: (18, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (19, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (19, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "PCSC-Lite daemon",
              position: (19, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "plugins",
            position: (21, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (21, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (22, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (22, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listOf",
                   position: (22, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (22, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "package",
                    position: (22, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (23, 7),
                },
               ],
              },
              List {
               elements: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (23, 19),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "ccid",
                    position: (23, 24),
                   },
                  ],
                 },
                 default: None,
                },
               ],
               position: (23, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (24, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (24, 21),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "[ pkgs.ccid ]",
                   position: (24, 40),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (25, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (25, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "[ pkgs.pcsc-cyberjack ]",
                   position: (25, 36),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (26, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Plugin packages to be used for PCSC-Lite.",
                 position: (26, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (21, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "readerConfig",
            position: (29, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (29, 20),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (30, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (30, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "lines",
                  position: (30, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (31, 7),
                },
               ],
              },
              String {
               parts: [],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (32, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "FRIENDLYNAME      \"Some serial reader\"\nDEVICENAME        /dev/ttyS0\nLIBPATH           /path/to/serial_reader.so\nCHANNELID         1\n",
                 position: (33, 1),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (38, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Configuration for devices that aren't hotpluggable.\n\nSee <citerefentry><refentrytitle>reader.conf</refentrytitle>\n<manvolnum>5</manvolnum></citerefentry> for valid options.\n",
                 position: (39, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (29, 29),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (18, 28),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (49, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (49, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "config",
          position: (49, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (49, 24),
           },
           Raw {
            content: "pcscd",
            position: (49, 33),
           },
           Raw {
            content: "enable",
            position: (49, 39),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (51, 5),
             },
             Raw {
              content: "etc",
              position: (51, 17),
             },
             Expression {
              expression: String {
               parts: [
                Raw {
                 content: "reader.conf",
                 position: (51, 22),
                },
               ],
              },
             },
             Raw {
              content: "source",
              position: (51, 35),
             },
            ],
           },
           Variable {
            identifier: "cfgFile",
            position: (51, 44),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (53, 5),
             },
             Raw {
              content: "systemPackages",
              position: (53, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (53, 36),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "pcsclite",
                 position: (53, 41),
                },
               ],
              },
              default: None,
             },
            ],
            position: (53, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (54, 5),
             },
             Raw {
              content: "packages",
              position: (54, 13),
             },
            ],
           },
           List {
            elements: [
             FunctionApplication {
              function: Variable {
               identifier: "getBin",
               position: (54, 27),
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (54, 34),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "pcsclite",
                   position: (54, 39),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ],
            position: (54, 24),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (56, 5),
             },
             Raw {
              content: "sockets",
              position: (56, 13),
             },
             Raw {
              content: "pcscd",
              position: (56, 21),
             },
             Raw {
              content: "wantedBy",
              position: (56, 27),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "sockets.target",
                position: (56, 41),
               },
              ],
             },
            ],
            position: (56, 38),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (58, 5),
             },
             Raw {
              content: "services",
              position: (58, 13),
             },
             Raw {
              content: "pcscd",
              position: (58, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "environment",
                 position: (59, 7),
                },
                Raw {
                 content: "PCSCLITE_HP_DROPDIR",
                 position: (59, 19),
                },
               ],
              },
              Variable {
               identifier: "pluginEnv",
               position: (59, 41),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "restartTriggers",
                 position: (60, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "/etc/reader.conf",
                   position: (60, 28),
                  },
                 ],
                },
               ],
               position: (60, 25),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (70, 7),
                },
                Raw {
                 content: "ExecStart",
                 position: (70, 21),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [],
                },
                String {
                 parts: [
                  Expression {
                   expression: FunctionApplication {
                    function: Variable {
                     identifier: "getBin",
                     position: (70, 41),
                    },
                    arguments: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "pkgs",
                       position: (70, 48),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "pcsclite",
                         position: (70, 53),
                        },
                       ],
                      },
                      default: None,
                     },
                    ],
                   },
                  },
                  Raw {
                   content: "/bin/pcscd -f -x -c ",
                   position: (70, 62),
                  },
                  Expression {
                   expression: Variable {
                    identifier: "cfgFile",
                    position: (70, 84),
                   },
                  },
                 ],
                },
               ],
               position: (70, 33),
              },
             ),
            ],
            recursive: false,
            position: (58, 30),
           },
          ),
         ],
         recursive: false,
         position: (49, 46),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (14, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}