---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "xdg",
         position: (6, 16),
        },
        Raw {
         content: "mime",
         position: (6, 20),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "associationOptions",
        position: (7, 3),
       },
      ],
     },
     With {
      expression: Variable {
       identifier: "types",
       position: (7, 29),
      },
      target: FunctionApplication {
       function: Variable {
        identifier: "attrsOf",
        position: (7, 36),
       },
       arguments: [
        FunctionApplication {
         function: Variable {
          identifier: "coercedTo",
          position: (8, 5),
         },
         arguments: [
          FunctionApplication {
           function: Variable {
            identifier: "either",
            position: (8, 16),
           },
           arguments: [
            FunctionApplication {
             function: Variable {
              identifier: "listOf",
              position: (8, 24),
             },
             arguments: [
              Variable {
               identifier: "str",
               position: (8, 31),
              },
             ],
            },
            Variable {
             identifier: "str",
             position: (8, 36),
            },
           ],
          },
          Function {
           argument: Some(
            "x",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: FunctionApplication {
            function: Variable {
             identifier: "concatStringsSep",
             position: (8, 45),
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: ";",
                position: (8, 63),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "toList",
               position: (8, 67),
              },
              arguments: [
               Variable {
                identifier: "x",
                position: (8, 74),
               },
              ],
             },
            ],
           },
           position: (8, 42),
          },
          Variable {
           identifier: "str",
           position: (8, 78),
          },
         ],
        },
       ],
      },
      position: (7, 24),
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (13, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "maintainers",
            position: (14, 5),
           },
          ],
         },
         BinaryOperation {
          operator: Concatenation,
          operands: [
           PropertyAccess {
            expression: Variable {
             identifier: "teams",
             position: (14, 19),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "freedesktop",
               position: (14, 25),
              },
              Raw {
               content: "members",
               position: (14, 37),
              },
             ],
            },
            default: None,
           },
           With {
            expression: Variable {
             identifier: "maintainers",
             position: (14, 54),
            },
            target: List {
             elements: [
              Variable {
               identifier: "figsoda",
               position: (14, 69),
              },
             ],
             position: (14, 67),
            },
            position: (14, 49),
           },
          ],
          position: (14, 45),
         },
        ),
       ],
       recursive: false,
       position: (13, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (17, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "xdg",
            position: (18, 5),
           },
           Raw {
            content: "mime",
            position: (18, 9),
           },
           Raw {
            content: "enable",
            position: (18, 14),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (18, 23),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (19, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (19, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bool",
                  position: (19, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (20, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (20, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (21, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Whether to install files to support the\n<link xlink:href=\"https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html\">XDG Shared MIME-info specification</link> and the\n<link xlink:href=\"https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html\">XDG MIME Applications specification</link>.\n",
                 position: (22, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (18, 32),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "xdg",
            position: (28, 5),
           },
           Raw {
            content: "mime",
            position: (28, 9),
           },
           Raw {
            content: "addedAssociations",
            position: (28, 14),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (28, 34),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (29, 7),
                },
               ],
              },
              Variable {
               identifier: "associationOptions",
               position: (29, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (30, 7),
                },
               ],
              },
              Map {
               bindings: [],
               recursive: false,
               position: (30, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (31, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Expression {
                    expression: String {
                     parts: [
                      Raw {
                       content: "application/pdf",
                       position: (32, 10),
                      },
                     ],
                    },
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "firefox.desktop",
                    position: (32, 30),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Expression {
                    expression: String {
                     parts: [
                      Raw {
                       content: "text/xml",
                       position: (33, 10),
                      },
                     ],
                    },
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "nvim.desktop",
                      position: (33, 25),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "codium.desktop",
                      position: (33, 40),
                     },
                    ],
                   },
                  ],
                  position: (33, 22),
                 },
                ),
               ],
               recursive: false,
               position: (31, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (35, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Adds associations between mimetypes and applications. See the\n<link xlink:href=\"https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#associations\">\nspecifications</link> for more information.\n",
                 position: (36, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (28, 43),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "xdg",
            position: (42, 5),
           },
           Raw {
            content: "mime",
            position: (42, 9),
           },
           Raw {
            content: "defaultApplications",
            position: (42, 14),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (42, 36),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (43, 7),
                },
               ],
              },
              Variable {
               identifier: "associationOptions",
               position: (43, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (44, 7),
                },
               ],
              },
              Map {
               bindings: [],
               recursive: false,
               position: (44, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (45, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Expression {
                    expression: String {
                     parts: [
                      Raw {
                       content: "application/pdf",
                       position: (46, 10),
                      },
                     ],
                    },
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "firefox.desktop",
                    position: (46, 30),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Expression {
                    expression: String {
                     parts: [
                      Raw {
                       content: "image/png",
                       position: (47, 10),
                      },
                     ],
                    },
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "sxiv.desktop",
                      position: (47, 26),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "gimp.desktop",
                      position: (47, 41),
                     },
                    ],
                   },
                  ],
                  position: (47, 23),
                 },
                ),
               ],
               recursive: false,
               position: (45, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (49, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Sets the default applications for given mimetypes. See the\n<link xlink:href=\"https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#default\">\nspecifications</link> for more information.\n",
                 position: (50, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (42, 45),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "xdg",
            position: (56, 5),
           },
           Raw {
            content: "mime",
            position: (56, 9),
           },
           Raw {
            content: "removedAssociations",
            position: (56, 14),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (56, 36),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (57, 7),
                },
               ],
              },
              Variable {
               identifier: "associationOptions",
               position: (57, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (58, 7),
                },
               ],
              },
              Map {
               bindings: [],
               recursive: false,
               position: (58, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (59, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Expression {
                    expression: String {
                     parts: [
                      Raw {
                       content: "audio/mp3",
                       position: (60, 10),
                      },
                     ],
                    },
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "mpv.desktop",
                      position: (60, 26),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "umpv.desktop",
                      position: (60, 40),
                     },
                    ],
                   },
                  ],
                  position: (60, 23),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Expression {
                    expression: String {
                     parts: [
                      Raw {
                       content: "inode/directory",
                       position: (61, 10),
                      },
                     ],
                    },
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "codium.desktop",
                    position: (61, 30),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (59, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (63, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Removes associations between mimetypes and applications. See the\n<link xlink:href=\"https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#associations\">\nspecifications</link> for more information.\n",
                 position: (64, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (56, 45),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (17, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (71, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (71, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (71, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (71, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (72, 5),
             },
             Raw {
              content: "etc",
              position: (72, 17),
             },
             Expression {
              expression: String {
               parts: [
                Raw {
                 content: "xdg/mimeapps.list",
                 position: (72, 22),
                },
               ],
              },
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (72, 43),
            },
            arguments: [
             BinaryOperation {
              operator: LogicalOr,
              operands: [
               BinaryOperation {
                operator: LogicalOr,
                operands: [
                 BinaryOperation {
                  operator: NotEqualTo,
                  operands: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (73, 7),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "addedAssociations",
                       position: (73, 11),
                      },
                     ],
                    },
                    default: None,
                   },
                   Map {
                    bindings: [],
                    recursive: false,
                    position: (73, 32),
                   },
                  ],
                  position: (73, 29),
                 },
                 BinaryOperation {
                  operator: NotEqualTo,
                  operands: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (74, 10),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "defaultApplications",
                       position: (74, 14),
                      },
                     ],
                    },
                    default: None,
                   },
                   Map {
                    bindings: [],
                    recursive: false,
                    position: (74, 37),
                   },
                  ],
                  position: (74, 34),
                 },
                ],
                position: (74, 7),
               },
               BinaryOperation {
                operator: NotEqualTo,
                operands: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (75, 10),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "removedAssociations",
                     position: (75, 14),
                    },
                   ],
                  },
                  default: None,
                 },
                 Map {
                  bindings: [],
                  recursive: false,
                  position: (75, 37),
                 },
                ],
                position: (75, 34),
               },
              ],
              position: (75, 7),
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "text",
                   position: (77, 7),
                  },
                 ],
                },
                FunctionApplication {
                 function: PropertyAccess {
                  expression: Variable {
                   identifier: "generators",
                   position: (77, 14),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "toINI",
                     position: (77, 25),
                    },
                   ],
                  },
                  default: None,
                 },
                 arguments: [
                  Map {
                   bindings: [],
                   recursive: false,
                   position: (77, 31),
                  },
                  Map {
                   bindings: [
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Expression {
                        expression: String {
                         parts: [
                          Raw {
                           content: "Added Associations",
                           position: (78, 10),
                          },
                         ],
                        },
                       },
                      ],
                     },
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (78, 32),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "addedAssociations",
                         position: (78, 36),
                        },
                       ],
                      },
                      default: None,
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Expression {
                        expression: String {
                         parts: [
                          Raw {
                           content: "Default Applications",
                           position: (79, 10),
                          },
                         ],
                        },
                       },
                      ],
                     },
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (79, 34),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "defaultApplications",
                         position: (79, 38),
                        },
                       ],
                      },
                      default: None,
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Expression {
                        expression: String {
                         parts: [
                          Raw {
                           content: "Removed Associations",
                           position: (80, 10),
                          },
                         ],
                        },
                       },
                      ],
                     },
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (80, 34),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "removedAssociations",
                         position: (80, 38),
                        },
                       ],
                      },
                      default: None,
                     },
                    ),
                   ],
                   recursive: false,
                   position: (77, 35),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (76, 7),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (84, 5),
             },
             Raw {
              content: "pathsToLink",
              position: (84, 17),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "/share/mime",
                position: (84, 34),
               },
              ],
             },
            ],
            position: (84, 31),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (86, 5),
             },
             Raw {
              content: "systemPackages",
              position: (86, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (88, 7),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "shared-mime-info",
                 position: (88, 12),
                },
               ],
              },
              default: None,
             },
            ],
            position: (86, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (91, 5),
             },
             Raw {
              content: "extraSetup",
              position: (91, 17),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "if [ -w $out/share/mime ] && [ -d $out/share/mime/packages ]; then\n    XDG_DATA_DIRS=$out/share PKGSYSTEM_ENABLE_FSYNC=0 ",
              position: (92, 1),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (93, 63),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "buildPackages",
                  position: (93, 68),
                 },
                 Raw {
                  content: "shared-mime-info",
                  position: (93, 82),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "/bin/update-mime-database -V $out/share/mime > /dev/null\nfi\n\nif [ -w $out/share/applications ]; then\n    ",
              position: (93, 99),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (97, 13),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "buildPackages",
                  position: (97, 18),
                 },
                 Raw {
                  content: "desktop-file-utils",
                  position: (97, 32),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "/bin/update-desktop-database $out/share/applications\nfi\n",
              position: (97, 51),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (71, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (12, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}