---
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: (5, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "drivers",
        position: (9, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (9, 13),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (9, 20),
        },
        Raw {
         content: "xserver",
         position: (9, 29),
        },
        Raw {
         content: "videoDrivers",
         position: (9, 37),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "enabled",
        position: (11, 3),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "elem",
       position: (11, 13),
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "amdgpu-pro",
          position: (11, 19),
         },
        ],
       },
       Variable {
        identifier: "drivers",
        position: (11, 31),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "package",
        position: (13, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (13, 13),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "boot",
         position: (13, 20),
        },
        Raw {
         content: "kernelPackages",
         position: (13, 25),
        },
        Raw {
         content: "amdgpu-pro",
         position: (13, 40),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "package32",
        position: (14, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (14, 15),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "pkgsi686Linux",
          position: (14, 20),
         },
         Raw {
          content: "linuxPackages",
          position: (14, 34),
         },
         Raw {
          content: "amdgpu-pro",
          position: (14, 48),
         },
         Raw {
          content: "override",
          position: (14, 59),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "kernel",
             position: (14, 70),
            },
           ],
          },
          Variable {
           identifier: "null",
           position: (14, 79),
          },
         ),
        ],
        recursive: false,
        position: (14, 68),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "opengl",
        position: (16, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (16, 12),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "hardware",
         position: (16, 19),
        },
        Raw {
         content: "opengl",
         position: (16, 28),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (22, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (22, 12),
       },
       arguments: [
        Variable {
         identifier: "enabled",
         position: (22, 17),
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "nixpkgs",
              position: (24, 5),
             },
             Raw {
              content: "config",
              position: (24, 13),
             },
             Raw {
              content: "xorg",
              position: (24, 20),
             },
             Raw {
              content: "abiCompat",
              position: (24, 25),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "1.20",
              position: (24, 38),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (26, 5),
             },
             Raw {
              content: "xserver",
              position: (26, 14),
             },
             Raw {
              content: "drivers",
              position: (26, 22),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "singleton",
             position: (26, 32),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "name",
                   position: (27, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "amdgpu",
                   position: (27, 17),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "modules",
                   position: (27, 26),
                  },
                 ],
                },
                List {
                 elements: [
                  Variable {
                   identifier: "package",
                   position: (27, 38),
                  },
                 ],
                 position: (27, 36),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "display",
                   position: (27, 49),
                  },
                 ],
                },
                Variable {
                 identifier: "true",
                 position: (27, 59),
                },
               ),
              ],
              recursive: false,
              position: (27, 7),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "hardware",
              position: (29, 5),
             },
             Raw {
              content: "opengl",
              position: (29, 14),
             },
             Raw {
              content: "package",
              position: (29, 21),
             },
            ],
           },
           Variable {
            identifier: "package",
            position: (29, 31),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "hardware",
              position: (30, 5),
             },
             Raw {
              content: "opengl",
              position: (30, 14),
             },
             Raw {
              content: "package32",
              position: (30, 21),
             },
            ],
           },
           Variable {
            identifier: "package32",
            position: (30, 33),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "hardware",
              position: (31, 5),
             },
             Raw {
              content: "opengl",
              position: (31, 14),
             },
             Raw {
              content: "setLdLibraryPath",
              position: (31, 21),
             },
            ],
           },
           Variable {
            identifier: "true",
            position: (31, 40),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (33, 5),
             },
             Raw {
              content: "extraModulePackages",
              position: (33, 10),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "package",
               position: (33, 34),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "kmod",
                 position: (33, 42),
                },
               ],
              },
              default: None,
             },
            ],
            position: (33, 32),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (35, 5),
             },
             Raw {
              content: "kernelPackages",
              position: (35, 10),
             },
            ],
           },
           FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "pkgs",
              position: (35, 27),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "linuxKernel",
                position: (35, 32),
               },
               Raw {
                content: "packagesFor",
                position: (35, 44),
               },
              ],
             },
             default: None,
            },
            arguments: [
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (36, 8),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "linuxKernel",
                  position: (36, 13),
                 },
                 Raw {
                  content: "kernels",
                  position: (36, 25),
                 },
                 Raw {
                  content: "linux_5_10",
                  position: (36, 33),
                 },
                 Raw {
                  content: "override",
                  position: (36, 44),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "structuredExtraConfig",
                     position: (37, 9),
                    },
                   ],
                  },
                  Map {
                   bindings: [
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "DEVICE_PRIVATE",
                        position: (38, 11),
                       },
                      ],
                     },
                     PropertyAccess {
                      expression: Variable {
                       identifier: "kernel",
                       position: (38, 28),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "yes",
                         position: (38, 35),
                        },
                       ],
                      },
                      default: None,
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "KALLSYMS_ALL",
                        position: (39, 11),
                       },
                      ],
                     },
                     PropertyAccess {
                      expression: Variable {
                       identifier: "kernel",
                       position: (39, 26),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "yes",
                         position: (39, 33),
                        },
                       ],
                      },
                      default: None,
                     },
                    ),
                   ],
                   recursive: false,
                   position: (37, 33),
                  },
                 ),
                ],
                recursive: false,
                position: (36, 53),
               },
              ],
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "hardware",
              position: (43, 5),
             },
             Raw {
              content: "firmware",
              position: (43, 14),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "package",
               position: (43, 27),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "fw",
                 position: (43, 35),
                },
               ],
              },
              default: None,
             },
            ],
            position: (43, 25),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "system",
              position: (45, 5),
             },
             Raw {
              content: "activationScripts",
              position: (45, 12),
             },
             Raw {
              content: "setup-amdgpu-pro",
              position: (45, 30),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "ln -sfn ",
              position: (46, 1),
             },
             Expression {
              expression: Variable {
               identifier: "package",
               position: (46, 17),
              },
             },
             Raw {
              content: "/opt/amdgpu{,-pro} /run\n",
              position: (46, 25),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "system",
              position: (49, 5),
             },
             Raw {
              content: "requiredKernelConfig",
              position: (49, 12),
             },
            ],
           },
           With {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "config",
              position: (49, 40),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "lib",
                position: (49, 47),
               },
               Raw {
                content: "kernelConfig",
                position: (49, 51),
               },
              ],
             },
             default: None,
            },
            target: List {
             elements: [
              FunctionApplication {
               function: Variable {
                identifier: "isYes",
                position: (50, 8),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "DEVICE_PRIVATE",
                   position: (50, 15),
                  },
                 ],
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "isYes",
                position: (51, 8),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "KALLSYMS_ALL",
                   position: (51, 15),
                  },
                 ],
                },
               ],
              },
             ],
             position: (49, 65),
            },
            position: (49, 35),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (54, 5),
             },
             Raw {
              content: "initrd",
              position: (54, 10),
             },
             Raw {
              content: "extraUdevRulesCommands",
              position: (54, 17),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "cp -v ",
              position: (55, 1),
             },
             Expression {
              expression: Variable {
               identifier: "package",
               position: (55, 15),
              },
             },
             Raw {
              content: "/etc/udev/rules.d/*.rules $out/\n",
              position: (55, 23),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (58, 5),
             },
             Raw {
              content: "systemPackages",
              position: (58, 17),
             },
            ],
           },
           BinaryOperation {
            operator: Concatenation,
            operands: [
             List {
              elements: [
               PropertyAccess {
                expression: Variable {
                 identifier: "package",
                 position: (59, 9),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "vulkan",
                   position: (59, 17),
                  },
                 ],
                },
                default: None,
               },
              ],
              position: (59, 7),
             },
             FunctionApplication {
              function: Variable {
               identifier: "optional",
               position: (61, 7),
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "config",
                 position: (61, 16),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "hardware",
                   position: (61, 23),
                  },
                  Raw {
                   content: "opengl",
                   position: (61, 32),
                  },
                  Raw {
                   content: "driSupport32Bit",
                   position: (61, 39),
                  },
                 ],
                },
                default: None,
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "package32",
                 position: (61, 55),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "vulkan",
                   position: (61, 65),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ],
            position: (59, 26),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (63, 5),
             },
             Raw {
              content: "etc",
              position: (63, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Expression {
                 expression: String {
                  parts: [
                   Raw {
                    content: "modprobe.d/blacklist-radeon.conf",
                    position: (64, 8),
                   },
                  ],
                 },
                },
                Raw {
                 content: "source",
                 position: (64, 42),
                },
               ],
              },
              BinaryOperation {
               operator: Addition,
               operands: [
                Variable {
                 identifier: "package",
                 position: (64, 51),
                },
                String {
                 parts: [
                  Raw {
                   content: "/etc/modprobe.d/blacklist-radeon.conf",
                   position: (64, 62),
                  },
                 ],
                },
               ],
               position: (64, 59),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "amd",
                 position: (65, 7),
                },
                Raw {
                 content: "source",
                 position: (65, 11),
                },
               ],
              },
              BinaryOperation {
               operator: Addition,
               operands: [
                Variable {
                 identifier: "package",
                 position: (65, 20),
                },
                String {
                 parts: [
                  Raw {
                   content: "/etc/amd",
                   position: (65, 31),
                  },
                 ],
                },
               ],
               position: (65, 28),
              },
             ),
            ],
            recursive: false,
            position: (63, 23),
           },
          ),
         ],
         recursive: false,
         position: (22, 25),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (20, 1),
   },
   position: (7, 1),
  },
  position: (5, 1),
 },
 position: (3, 1),
}