---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: Map {
  bindings: [
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "addMetaAttrs",
       position: (15, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "newAttrs",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: Function {
      argument: Some(
       "drv",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: BinaryOperation {
       operator: Update,
       operands: [
        Variable {
         identifier: "drv",
         position: (16, 5),
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "meta",
              position: (16, 14),
             },
            ],
           },
           BinaryOperation {
            operator: Update,
            operands: [
             PropertyAccess {
              expression: Variable {
               identifier: "drv",
               position: (16, 22),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "meta",
                 position: (16, 26),
                },
               ],
              },
              default: Some(
               Map {
                bindings: [],
                recursive: false,
                position: (16, 34),
               },
              ),
             },
             Variable {
              identifier: "newAttrs",
              position: (16, 41),
             },
            ],
            position: (16, 38),
           },
          ),
         ],
         recursive: false,
         position: (16, 12),
        },
       ],
       position: (16, 9),
      },
      position: (15, 28),
     },
     position: (15, 18),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "dontDistribute",
       position: (21, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "drv",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: FunctionApplication {
      function: Variable {
       identifier: "addMetaAttrs",
       position: (21, 25),
      },
      arguments: [
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "hydraPlatforms",
             position: (21, 40),
            },
           ],
          },
          List {
           elements: [],
           position: (21, 57),
          },
         ),
        ],
        recursive: false,
        position: (21, 38),
       },
       Variable {
        identifier: "drv",
        position: (21, 63),
       },
      ],
     },
     position: (21, 20),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "setName",
       position: (27, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "name",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: Function {
      argument: Some(
       "drv",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: BinaryOperation {
       operator: Update,
       operands: [
        Variable {
         identifier: "drv",
         position: (27, 24),
        },
        Map {
         bindings: [
          Inherit(
           None,
           [
            Raw {
             content: "name",
             position: (27, 40),
            },
           ],
          ),
         ],
         recursive: false,
         position: (27, 31),
        },
       ],
       position: (27, 28),
      },
      position: (27, 19),
     },
     position: (27, 13),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "updateName",
       position: (35, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "updater",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: Function {
      argument: Some(
       "drv",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: BinaryOperation {
       operator: Update,
       operands: [
        Variable {
         identifier: "drv",
         position: (35, 30),
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "name",
              position: (35, 38),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "updater",
             position: (35, 45),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "drv",
               position: (35, 54),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "name",
                 position: (35, 58),
                },
               ],
              },
              default: None,
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (35, 37),
        },
       ],
       position: (35, 34),
      },
      position: (35, 25),
     },
     position: (35, 16),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "appendToName",
       position: (40, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "suffix",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: FunctionApplication {
      function: Variable {
       identifier: "updateName",
       position: (40, 26),
      },
      arguments: [
       Function {
        argument: Some(
         "name",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: LetIn {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "x",
              position: (41, 9),
             },
            ],
           },
           FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "builtins",
              position: (41, 13),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "parseDrvName",
                position: (41, 22),
               },
              ],
             },
             default: None,
            },
            arguments: [
             Variable {
              identifier: "name",
              position: (41, 35),
             },
            ],
           },
          ),
         ],
         target: String {
          parts: [
           Expression {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "x",
              position: (41, 47),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "name",
                position: (41, 49),
               },
              ],
             },
             default: None,
            },
           },
           Raw {
            content: "-",
            position: (41, 54),
           },
           Expression {
            expression: Variable {
             identifier: "suffix",
             position: (41, 57),
            },
           },
           Raw {
            content: "-",
            position: (41, 64),
           },
           Expression {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "x",
              position: (41, 67),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "version",
                position: (41, 69),
               },
              ],
             },
             default: None,
            },
           },
          ],
         },
         position: (41, 5),
        },
        position: (40, 38),
       },
      ],
     },
     position: (40, 18),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "mapDerivationAttrset",
       position: (46, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "f",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: Function {
      argument: Some(
       "set",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "lib",
         position: (46, 34),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "mapAttrs",
           position: (46, 38),
          },
         ],
        },
        default: None,
       },
       arguments: [
        Function {
         argument: Some(
          "name",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: Function {
          argument: Some(
           "pkg",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: IfThenElse {
           predicate: FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "lib",
              position: (46, 62),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "isDerivation",
                position: (46, 66),
               },
              ],
             },
             default: None,
            },
            arguments: [
             Variable {
              identifier: "pkg",
              position: (46, 79),
             },
            ],
           },
           then: FunctionApplication {
            function: Variable {
             identifier: "f",
             position: (46, 89),
            },
            arguments: [
             Variable {
              identifier: "pkg",
              position: (46, 91),
             },
            ],
           },
           else_: Variable {
            identifier: "pkg",
            position: (46, 101),
           },
           position: (46, 59),
          },
          position: (46, 54),
         },
         position: (46, 48),
        },
        Variable {
         identifier: "set",
         position: (46, 106),
        },
       ],
      },
      position: (46, 29),
     },
     position: (46, 26),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "setPrio",
       position: (50, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "priority",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: FunctionApplication {
      function: Variable {
       identifier: "addMetaAttrs",
       position: (50, 23),
      },
      arguments: [
       Map {
        bindings: [
         Inherit(
          None,
          [
           Raw {
            content: "priority",
            position: (50, 46),
           },
          ],
         ),
        ],
        recursive: false,
        position: (50, 36),
       },
      ],
     },
     position: (50, 13),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "lowPrio",
       position: (55, 3),
      },
     ],
    },
    FunctionApplication {
     function: Variable {
      identifier: "setPrio",
      position: (55, 13),
     },
     arguments: [
      Int {
       value: 10,
       position: (55, 21),
      },
     ],
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "lowPrioSet",
       position: (59, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "set",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: FunctionApplication {
      function: Variable {
       identifier: "mapDerivationAttrset",
       position: (59, 21),
      },
      arguments: [
       Variable {
        identifier: "lowPrio",
        position: (59, 42),
       },
       Variable {
        identifier: "set",
        position: (59, 50),
       },
      ],
     },
     position: (59, 16),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "hiPrio",
       position: (65, 3),
      },
     ],
    },
    FunctionApplication {
     function: Variable {
      identifier: "setPrio",
      position: (65, 12),
     },
     arguments: [
      UnaryOperation {
       operator: Negate,
       operand: Int {
        value: 10,
        position: (65, 22),
       },
       position: (65, 21),
      },
     ],
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "hiPrioSet",
       position: (69, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "set",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: FunctionApplication {
      function: Variable {
       identifier: "mapDerivationAttrset",
       position: (69, 20),
      },
      arguments: [
       Variable {
        identifier: "hiPrio",
        position: (69, 41),
       },
       Variable {
        identifier: "set",
        position: (69, 48),
       },
      ],
     },
     position: (69, 15),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "platformMatch",
       position: (84, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "platform",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: Function {
      argument: Some(
       "elem",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: LetIn {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "pattern",
            position: (85, 7),
           },
          ],
         },
         IfThenElse {
          predicate: FunctionApplication {
           function: PropertyAccess {
            expression: Variable {
             identifier: "builtins",
             position: (86, 12),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "isString",
               position: (86, 21),
              },
             ],
            },
            default: None,
           },
           arguments: [
            Variable {
             identifier: "elem",
             position: (86, 30),
            },
           ],
          },
          then: Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "system",
                position: (87, 16),
               },
              ],
             },
             Variable {
              identifier: "elem",
              position: (87, 25),
             },
            ),
           ],
           recursive: false,
           position: (87, 14),
          },
          else_: Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "parsed",
                position: (88, 16),
               },
              ],
             },
             Variable {
              identifier: "elem",
              position: (88, 25),
             },
            ),
           ],
           recursive: false,
           position: (88, 14),
          },
          position: (86, 9),
         },
        ),
       ],
       target: FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "lib",
          position: (89, 8),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "matchAttrs",
            position: (89, 12),
           },
          ],
         },
         default: None,
        },
        arguments: [
         Variable {
          identifier: "pattern",
          position: (89, 23),
         },
         Variable {
          identifier: "platform",
          position: (89, 31),
         },
        ],
       },
       position: (84, 35),
      },
      position: (84, 29),
     },
     position: (84, 19),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "availableOn",
       position: (99, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "platform",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: Function {
      argument: Some(
       "pkg",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: BinaryOperation {
       operator: LogicalAnd,
       operands: [
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (100, 5),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "any",
             position: (100, 9),
            },
           ],
          },
          default: None,
         },
         arguments: [
          FunctionApplication {
           function: Variable {
            identifier: "platformMatch",
            position: (100, 14),
           },
           arguments: [
            Variable {
             identifier: "platform",
             position: (100, 28),
            },
           ],
          },
          PropertyAccess {
           expression: Variable {
            identifier: "pkg",
            position: (100, 38),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "meta",
              position: (100, 42),
             },
             Raw {
              content: "platforms",
              position: (100, 47),
             },
            ],
           },
           default: None,
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (101, 5),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "all",
             position: (101, 9),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Function {
           argument: Some(
            "elem",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: UnaryOperation {
            operator: Not,
            operand: FunctionApplication {
             function: Variable {
              identifier: "platformMatch",
              position: (101, 21),
             },
             arguments: [
              Variable {
               identifier: "platform",
               position: (101, 35),
              },
              Variable {
               identifier: "elem",
               position: (101, 44),
              },
             ],
            },
            position: (101, 20),
           },
           position: (101, 14),
          },
          PropertyAccess {
           expression: Variable {
            identifier: "pkg",
            position: (101, 51),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "meta",
              position: (101, 55),
             },
             Raw {
              content: "badPlatforms",
              position: (101, 60),
             },
            ],
           },
           default: Some(
            List {
             elements: [],
             position: (101, 76),
            },
           ),
          },
         ],
        },
       ],
       position: (100, 57),
      },
      position: (99, 27),
     },
     position: (99, 17),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "getLicenseFromSpdxId",
       position: (120, 3),
      },
     ],
    },
    LetIn {
     bindings: [
      KeyValue(
       AttributePath {
        attributes: [
         Raw {
          content: "spdxLicenses",
          position: (122, 7),
         },
        ],
       },
       FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "lib",
          position: (122, 22),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "mapAttrs",
            position: (122, 26),
           },
          ],
         },
         default: None,
        },
        arguments: [
         Function {
          argument: Some(
           "id",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: Function {
           argument: Some(
            "ls",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: Assert {
            expression: BinaryOperation {
             operator: EqualTo,
             operands: [
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "lib",
                 position: (122, 51),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "length",
                   position: (122, 55),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                Variable {
                 identifier: "ls",
                 position: (122, 62),
                },
               ],
              },
              Int {
               value: 1,
               position: (122, 68),
              },
             ],
             position: (122, 65),
            },
            target: FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "builtins",
               position: (122, 71),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "head",
                 position: (122, 80),
                },
               ],
              },
              default: None,
             },
             arguments: [
              Variable {
               identifier: "ls",
               position: (122, 85),
              },
             ],
            },
            position: (122, 44),
           },
           position: (122, 40),
          },
          position: (122, 36),
         },
         FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "lib",
            position: (123, 10),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "groupBy",
              position: (123, 14),
             },
            ],
           },
           default: None,
          },
          arguments: [
           Function {
            argument: Some(
             "l",
            ),
            arguments: FunctionArguments {
             arguments: [],
             ellipsis: false,
            },
            definition: FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "lib",
               position: (123, 26),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "toLower",
                 position: (123, 30),
                },
               ],
              },
              default: None,
             },
             arguments: [
              PropertyAccess {
               expression: Variable {
                identifier: "l",
                position: (123, 38),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "spdxId",
                  position: (123, 40),
                 },
                ],
               },
               default: None,
              },
             ],
            },
            position: (123, 23),
           },
           FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "lib",
              position: (123, 49),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "filter",
                position: (123, 53),
               },
              ],
             },
             default: None,
            },
            arguments: [
             Function {
              argument: Some(
               "l",
              ),
              arguments: FunctionArguments {
               arguments: [],
               ellipsis: false,
              },
              definition: HasProperty {
               expression: Variable {
                identifier: "l",
                position: (123, 64),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "spdxId",
                  position: (123, 68),
                 },
                ],
               },
               position: (123, 66),
              },
              position: (123, 61),
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "lib",
                position: (123, 77),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "attrValues",
                  position: (123, 81),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "lib",
                 position: (123, 92),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "licenses",
                   position: (123, 96),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ],
           },
          ],
         },
        ],
       },
      ),
     ],
     target: Function {
      argument: Some(
       "licstr",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: PropertyAccess {
       expression: Variable {
        identifier: "spdxLicenses",
        position: (125, 7),
       },
       attribute_path: AttributePath {
        attributes: [
         Expression {
          expression: FunctionApplication {
           function: PropertyAccess {
            expression: Variable {
             identifier: "lib",
             position: (125, 23),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "toLower",
               position: (125, 27),
              },
             ],
            },
            default: None,
           },
           arguments: [
            Variable {
             identifier: "licstr",
             position: (125, 35),
            },
           ],
          },
         },
        ],
       },
       default: Some(
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (126, 9),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "warn",
             position: (126, 13),
            },
           ],
          },
          default: None,
         },
         arguments: [
          String {
           parts: [
            Raw {
             content: "getLicenseFromSpdxId: No license matches the given SPDX ID: ",
             position: (126, 19),
            },
            Expression {
             expression: Variable {
              identifier: "licstr",
              position: (126, 81),
             },
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "shortName",
                position: (127, 11),
               },
              ],
             },
             Variable {
              identifier: "licstr",
              position: (127, 23),
             },
            ),
           ],
           recursive: false,
           position: (127, 9),
          },
         ],
        },
       ),
      },
      position: (124, 8),
     },
     position: (121, 5),
    },
   ),
  ],
  recursive: true,
  position: (6, 1),
 },
 position: (4, 1),
}