---
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: (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: "felix",
         position: (8, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (16, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (18, 5),
           },
           Raw {
            content: "felix",
            position: (18, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (20, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (20, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "the Apache Felix OSGi service",
                 position: (20, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "bundles",
               position: (22, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (22, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (23, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (23, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "listOf",
                      position: (23, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (23, 29),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "package",
                       position: (23, 35),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (24, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "pkgs",
                     position: (24, 21),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "felix_remoteshell",
                       position: (24, 26),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                  position: (24, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (25, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (25, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "[ pkgs.felix_remoteshell ]",
                      position: (25, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (26, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "List of bundles that should be activated on startup",
                    position: (26, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (22, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "user",
               position: (29, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (29, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (30, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (30, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (30, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (31, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "osgi",
                    position: (31, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (32, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "User account under which Apache Felix runs.",
                    position: (32, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (29, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "group",
               position: (35, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (35, 15),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (36, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (36, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (36, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (37, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "osgi",
                    position: (37, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (38, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Group account under which Apache Felix runs.",
                    position: (38, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (35, 24),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (18, 22),
         },
        ),
       ],
       recursive: false,
       position: (16, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (48, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (48, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (48, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (48, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (49, 5),
             },
             Raw {
              content: "groups",
              position: (49, 11),
             },
             Raw {
              content: "osgi",
              position: (49, 18),
             },
             Raw {
              content: "gid",
              position: (49, 23),
             },
            ],
           },
           PropertyAccess {
            expression: Variable {
             identifier: "config",
             position: (49, 29),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "ids",
               position: (49, 36),
              },
              Raw {
               content: "gids",
               position: (49, 40),
              },
              Raw {
               content: "osgi",
               position: (49, 45),
              },
             ],
            },
            default: None,
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (51, 5),
             },
             Raw {
              content: "users",
              position: (51, 11),
             },
             Raw {
              content: "osgi",
              position: (51, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "uid",
                 position: (52, 9),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "config",
                position: (52, 15),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "ids",
                  position: (52, 22),
                 },
                 Raw {
                  content: "uids",
                  position: (52, 26),
                 },
                 Raw {
                  content: "osgi",
                  position: (52, 31),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (53, 9),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "OSGi user",
                 position: (53, 24),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "home",
                 position: (54, 9),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/homeless-shelter",
                 position: (54, 17),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (52, 7),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (57, 5),
             },
             Raw {
              content: "services",
              position: (57, 13),
             },
             Raw {
              content: "felix",
              position: (57, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (58, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Felix server",
                 position: (58, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (59, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (59, 21),
                  },
                 ],
                },
               ],
               position: (59, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "preStart",
                 position: (61, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "# Initialise felix instance on first startup\nif [ ! -d /var/felix ]\nthen\n  # Symlink system files\n\n  mkdir -p /var/felix\n  chown ",
                 position: (62, 1),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (68, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (68, 23),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: ":",
                 position: (68, 28),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (68, 31),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (68, 35),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: " /var/felix\n\n  for i in ",
                 position: (68, 41),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (70, 22),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "felix",
                     position: (70, 27),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/*\n  do\n      if [ \"$i\" != \"",
                 position: (70, 33),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (72, 31),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "felix",
                     position: (72, 36),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/bundle\" ]\n      then\n          ln -sfn $i /var/felix/$(basename $i)\n      fi\n  done\n\n  # Symlink bundles\n  mkdir -p /var/felix/bundle\n  chown ",
                 position: (72, 42),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (80, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (80, 23),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: ":",
                 position: (80, 28),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (80, 31),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (80, 35),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: " /var/felix/bundle\n\n  for i in ",
                 position: (80, 41),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (82, 22),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "felix",
                     position: (82, 27),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/bundle/* ",
                 position: (82, 33),
                },
                Expression {
                 expression: FunctionApplication {
                  function: Variable {
                   identifier: "toString",
                   position: (82, 45),
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (82, 54),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "bundles",
                       position: (82, 58),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
                Raw {
                 content: "\n  do\n      if [ -f $i ]\n      then\n          ln -sfn $i /var/felix/bundle/$(basename $i)\n      elif [ -d $i ]\n      then\n          for j in $i/bundle/*\n      do\n          ln -sfn $j /var/felix/bundle/$(basename $j)\n      done\n      fi\n  done\nfi\n",
                 position: (82, 66),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "script",
                 position: (98, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "cd /var/felix\n",
                 position: (99, 1),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (100, 11),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "su",
                     position: (100, 16),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/bin/su -s ",
                 position: (100, 19),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (100, 32),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bash",
                     position: (100, 37),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/bin/sh ",
                 position: (100, 42),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (100, 52),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (100, 56),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: " -c ",
                 position: (100, 61),
                },
                Raw {
                 content: "'",
                 position: (100, 65),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (100, 68),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "jre",
                     position: (100, 73),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/bin/java -jar bin/felix.jar'\n",
                 position: (100, 77),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (57, 30),
           },
          ),
         ],
         recursive: false,
         position: (48, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (12, 1),
   },
   position: (6, 1),
  },
  position: (4, 1),
 },
 position: (2, 1),
}