---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "pkgs",
   position: (3, 6),
  },
  target: With {
   expression: Variable {
    identifier: "lib",
    position: (4, 6),
   },
   target: LetIn {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "cfg",
         position: (8, 3),
        },
       ],
      },
      PropertyAccess {
       expression: Variable {
        identifier: "config",
        position: (8, 9),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "services",
          position: (8, 16),
         },
         Raw {
          content: "riemann",
          position: (8, 25),
         },
        ],
       },
       default: None,
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "classpath",
         position: (10, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "concatStringsSep",
        position: (10, 15),
       },
       arguments: [
        String {
         parts: [
          Raw {
           content: ":",
           position: (10, 33),
          },
         ],
        },
        BinaryOperation {
         operator: Concatenation,
         operands: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (11, 5),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "extraClasspathEntries",
              position: (11, 9),
             },
            ],
           },
           default: None,
          },
          List {
           elements: [
            String {
             parts: [
              Expression {
               expression: Variable {
                identifier: "riemann",
                position: (11, 39),
               },
              },
              Raw {
               content: "/share/java/riemann.jar",
               position: (11, 47),
              },
             ],
            },
           ],
           position: (11, 34),
          },
         ],
         position: (11, 31),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "riemannConfig",
         position: (14, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "concatStringsSep",
        position: (14, 19),
       },
       arguments: [
        String {
         parts: [
          Raw {
           content: "\n",
           position: (14, 37),
          },
         ],
        },
        BinaryOperation {
         operator: Concatenation,
         operands: [
          List {
           elements: [
            PropertyAccess {
             expression: Variable {
              identifier: "cfg",
              position: (15, 6),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "config",
                position: (15, 10),
               },
              ],
             },
             default: None,
            },
           ],
           position: (15, 5),
          },
          FunctionApplication {
           function: Variable {
            identifier: "map",
            position: (15, 22),
           },
           arguments: [
            Function {
             argument: Some(
              "f",
             ),
             arguments: FunctionArguments {
              arguments: [],
              ellipsis: false,
             },
             definition: String {
              parts: [
               Raw {
                content: "(load-file \"",
                position: (15, 32),
               },
               Expression {
                expression: Variable {
                 identifier: "f",
                 position: (15, 46),
                },
               },
               Raw {
                content: "\")",
                position: (15, 48),
               },
              ],
             },
             position: (15, 27),
            },
            PropertyAccess {
             expression: Variable {
              identifier: "cfg",
              position: (15, 54),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "configFiles",
                position: (15, 58),
               },
              ],
             },
             default: None,
            },
           ],
          },
         ],
         position: (15, 18),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "launcher",
         position: (18, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "writeScriptBin",
        position: (18, 14),
       },
       arguments: [
        String {
         parts: [
          Raw {
           content: "riemann",
           position: (18, 30),
          },
         ],
        },
        String {
         parts: [
          Raw {
           content: "#!/bin/sh\nexec ",
           position: (19, 1),
          },
          Expression {
           expression: Variable {
            identifier: "jdk",
            position: (20, 12),
           },
          },
          Raw {
           content: "/bin/java ",
           position: (20, 16),
          },
          Expression {
           expression: FunctionApplication {
            function: Variable {
             identifier: "concatStringsSep",
             position: (20, 28),
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: " ",
                position: (20, 46),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (20, 49),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "extraJavaOpts",
                 position: (20, 53),
                },
               ],
              },
              default: None,
             },
            ],
           },
          },
          Raw {
           content: " \\\n  -cp ",
           position: (20, 67),
          },
          Expression {
           expression: Variable {
            identifier: "classpath",
            position: (21, 13),
           },
          },
          Raw {
           content: " \\\n  riemann.bin ",
           position: (21, 23),
          },
          Expression {
           expression: PropertyAccess {
            expression: Variable {
             identifier: "cfg",
             position: (22, 21),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "configFile",
               position: (22, 25),
              },
             ],
            },
            default: None,
           },
          },
          Raw {
           content: "\n",
           position: (22, 36),
          },
         ],
        },
       ],
      },
     ),
    ],
    target: Map {
     bindings: [
      KeyValue(
       AttributePath {
        attributes: [
         Raw {
          content: "options",
          position: (27, 3),
         },
        ],
       },
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "services",
             position: (29, 5),
            },
            Raw {
             content: "riemann",
             position: (29, 14),
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "enable",
                position: (30, 7),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "mkOption",
               position: (30, 16),
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (31, 9),
                    },
                   ],
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (31, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "bool",
                      position: (31, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "default",
                     position: (32, 9),
                    },
                   ],
                  },
                  Variable {
                   identifier: "false",
                   position: (32, 19),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "description",
                     position: (33, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "Enable the Riemann network monitoring daemon.\n",
                     position: (34, 1),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (30, 25),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "config",
                position: (37, 7),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "mkOption",
               position: (37, 16),
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (38, 9),
                    },
                   ],
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (38, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "lines",
                      position: (38, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "description",
                     position: (39, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "Contents of the Riemann configuration file. For more complicated\nconfig you should use configFile.\n",
                     position: (40, 1),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (37, 25),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "configFiles",
                position: (44, 7),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "mkOption",
               position: (44, 21),
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (45, 9),
                    },
                   ],
                  },
                  With {
                   expression: Variable {
                    identifier: "types",
                    position: (45, 21),
                   },
                   target: FunctionApplication {
                    function: Variable {
                     identifier: "listOf",
                     position: (45, 28),
                    },
                    arguments: [
                     Variable {
                      identifier: "path",
                      position: (45, 35),
                     },
                    ],
                   },
                   position: (45, 16),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "default",
                     position: (46, 9),
                    },
                   ],
                  },
                  List {
                   elements: [],
                   position: (46, 19),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "description",
                     position: (47, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "Extra files containing Riemann configuration. These files will be\nloaded at runtime by Riemann (with Clojure's\n<literal>load-file</literal> function) at the end of the\nconfiguration if you use the config option, this is ignored if you\nuse configFile.\n",
                     position: (48, 1),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (44, 30),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "configFile",
                position: (55, 7),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "mkOption",
               position: (55, 20),
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (56, 9),
                    },
                   ],
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (56, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "str",
                      position: (56, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "description",
                     position: (57, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "A Riemann config file. Any files in the same directory as this file\nwill be added to the classpath by Riemann.\n",
                     position: (58, 1),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (55, 29),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "extraClasspathEntries",
                position: (62, 7),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "mkOption",
               position: (62, 31),
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (63, 9),
                    },
                   ],
                  },
                  With {
                   expression: Variable {
                    identifier: "types",
                    position: (63, 21),
                   },
                   target: FunctionApplication {
                    function: Variable {
                     identifier: "listOf",
                     position: (63, 28),
                    },
                    arguments: [
                     Variable {
                      identifier: "str",
                      position: (63, 35),
                     },
                    ],
                   },
                   position: (63, 16),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "default",
                     position: (64, 9),
                    },
                   ],
                  },
                  List {
                   elements: [],
                   position: (64, 19),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "description",
                     position: (65, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "Extra entries added to the Java classpath when running Riemann.\n",
                     position: (66, 1),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (62, 40),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "extraJavaOpts",
                position: (69, 7),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "mkOption",
               position: (69, 23),
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (70, 9),
                    },
                   ],
                  },
                  With {
                   expression: Variable {
                    identifier: "types",
                    position: (70, 21),
                   },
                   target: FunctionApplication {
                    function: Variable {
                     identifier: "listOf",
                     position: (70, 28),
                    },
                    arguments: [
                     Variable {
                      identifier: "str",
                      position: (70, 35),
                     },
                    ],
                   },
                   position: (70, 16),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "default",
                     position: (71, 9),
                    },
                   ],
                  },
                  List {
                   elements: [],
                   position: (71, 19),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "description",
                     position: (72, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "Extra Java options used when launching Riemann.\n",
                     position: (73, 1),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (69, 32),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (29, 24),
          },
         ),
        ],
        recursive: false,
        position: (27, 13),
       },
      ),
      KeyValue(
       AttributePath {
        attributes: [
         Raw {
          content: "config",
          position: (79, 3),
         },
        ],
       },
       FunctionApplication {
        function: Variable {
         identifier: "mkIf",
         position: (79, 12),
        },
        arguments: [
         PropertyAccess {
          expression: Variable {
           identifier: "cfg",
           position: (79, 17),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "enable",
             position: (79, 21),
            },
           ],
          },
          default: None,
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "users",
               position: (81, 5),
              },
              Raw {
               content: "groups",
               position: (81, 11),
              },
              Raw {
               content: "riemann",
               position: (81, 18),
              },
              Raw {
               content: "gid",
               position: (81, 26),
              },
             ],
            },
            PropertyAccess {
             expression: Variable {
              identifier: "config",
              position: (81, 32),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "ids",
                position: (81, 39),
               },
               Raw {
                content: "gids",
                position: (81, 43),
               },
               Raw {
                content: "riemann",
                position: (81, 48),
               },
              ],
             },
             default: None,
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "users",
               position: (83, 5),
              },
              Raw {
               content: "users",
               position: (83, 11),
              },
              Raw {
               content: "riemann",
               position: (83, 17),
              },
             ],
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "description",
                  position: (84, 7),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "riemann daemon user",
                  position: (84, 22),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "uid",
                  position: (85, 7),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "config",
                 position: (85, 13),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "ids",
                   position: (85, 20),
                  },
                  Raw {
                   content: "uids",
                   position: (85, 24),
                  },
                  Raw {
                   content: "riemann",
                   position: (85, 29),
                  },
                 ],
                },
                default: None,
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "group",
                  position: (86, 7),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "riemann",
                  position: (86, 16),
                 },
                ],
               },
              ),
             ],
             recursive: false,
             position: (83, 27),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "services",
               position: (89, 5),
              },
              Raw {
               content: "riemann",
               position: (89, 14),
              },
              Raw {
               content: "configFile",
               position: (89, 22),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkDefault",
              position: (89, 35),
             },
             arguments: [
              FunctionApplication {
               function: Variable {
                identifier: "writeText",
                position: (90, 7),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "riemann-config.clj",
                   position: (90, 18),
                  },
                 ],
                },
                Variable {
                 identifier: "riemannConfig",
                 position: (90, 38),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "systemd",
               position: (93, 5),
              },
              Raw {
               content: "services",
               position: (93, 13),
              },
              Raw {
               content: "riemann",
               position: (93, 22),
              },
             ],
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "wantedBy",
                  position: (94, 7),
                 },
                ],
               },
               List {
                elements: [
                 String {
                  parts: [
                   Raw {
                    content: "multi-user.target",
                    position: (94, 21),
                   },
                  ],
                 },
                ],
                position: (94, 18),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (95, 7),
                 },
                ],
               },
               List {
                elements: [
                 Variable {
                  identifier: "inetutils",
                  position: (95, 16),
                 },
                ],
                position: (95, 14),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "serviceConfig",
                  position: (96, 7),
                 },
                ],
               },
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "User",
                     position: (97, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "riemann",
                     position: (97, 17),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "ExecStart",
                     position: (98, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Expression {
                     expression: Variable {
                      identifier: "launcher",
                      position: (98, 24),
                     },
                    },
                    Raw {
                     content: "/bin/riemann",
                     position: (98, 33),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (96, 23),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "serviceConfig",
                  position: (100, 7),
                 },
                 Raw {
                  content: "LimitNOFILE",
                  position: (100, 21),
                 },
                ],
               },
               Int {
                value: 65536,
                position: (100, 35),
               },
              ),
             ],
             recursive: false,
             position: (93, 32),
            },
           ),
          ],
          recursive: false,
          position: (79, 28),
         },
        ],
       },
      ),
     ],
     recursive: false,
     position: (25, 4),
    },
    position: (6, 1),
   },
   position: (4, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}