---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (5, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (5, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "programs",
         position: (5, 16),
        },
        Raw {
         content: "ccache",
         position: (5, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (7, 3),
        },
        Raw {
         content: "programs",
         position: (7, 11),
        },
        Raw {
         content: "ccache",
         position: (7, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (9, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (9, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "CCache",
              position: (9, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "cacheDir",
            position: (10, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (10, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (11, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (11, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (11, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (12, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "CCache directory",
                 position: (12, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (13, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/var/cache/ccache",
                 position: (13, 18),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (10, 25),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "packageNames",
            position: (16, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (16, 20),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (17, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (17, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listOf",
                   position: (17, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (17, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (17, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (18, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Nix top-level packages to be compiled using CCache",
                 position: (18, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (19, 7),
                },
               ],
              },
              List {
               elements: [],
               position: (19, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (20, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "wxGTK30",
                   position: (20, 20),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "ffmpeg",
                   position: (20, 30),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "libav_all",
                   position: (20, 39),
                  },
                 ],
                },
               ],
               position: (20, 17),
              },
             ),
            ],
            recursive: false,
            position: (16, 29),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (7, 29),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (24, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkMerge",
        position: (24, 12),
       },
       arguments: [
        List {
         elements: [
          FunctionApplication {
           function: Variable {
            identifier: "mkIf",
            position: (26, 6),
           },
           arguments: [
            PropertyAccess {
             expression: Variable {
              identifier: "cfg",
              position: (26, 11),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "enable",
                position: (26, 15),
               },
              ],
             },
             default: None,
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "systemd",
                  position: (27, 7),
                 },
                 Raw {
                  content: "tmpfiles",
                  position: (27, 15),
                 },
                 Raw {
                  content: "rules",
                  position: (27, 24),
                 },
                ],
               },
               List {
                elements: [
                 String {
                  parts: [
                   Raw {
                    content: "d ",
                    position: (27, 35),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (27, 39),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "cacheDir",
                        position: (27, 43),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: " 0770 root nixbld -",
                    position: (27, 52),
                   },
                  ],
                 },
                ],
                position: (27, 32),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "security",
                  position: (30, 7),
                 },
                 Raw {
                  content: "wrappers",
                  position: (30, 16),
                 },
                 Raw {
                  content: "nix-ccache",
                  position: (30, 25),
                 },
                ],
               },
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "owner",
                     position: (31, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "root",
                     position: (31, 18),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (32, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "nixbld",
                     position: (32, 18),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "setuid",
                     position: (33, 9),
                    },
                   ],
                  },
                  Variable {
                   identifier: "false",
                   position: (33, 18),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "setgid",
                     position: (34, 9),
                    },
                   ],
                  },
                  Variable {
                   identifier: "true",
                   position: (34, 18),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "source",
                     position: (35, 9),
                    },
                   ],
                  },
                  FunctionApplication {
                   function: PropertyAccess {
                    expression: Variable {
                     identifier: "pkgs",
                     position: (35, 18),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "writeScript",
                       position: (35, 23),
                      },
                     ],
                    },
                    default: None,
                   },
                   arguments: [
                    String {
                     parts: [
                      Raw {
                       content: "nix-ccache.pl",
                       position: (35, 36),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "#!",
                       position: (36, 1),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "pkgs",
                         position: (36, 15),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "perl",
                           position: (36, 20),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: "/bin/perl\n\n%ENV=( CCACHE_DIR => ",
                       position: (36, 25),
                      },
                      Raw {
                       content: "'",
                       position: (38, 32),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (38, 35),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "cacheDir",
                           position: (38, 39),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: "' );\nsub untaint {\n  my $v = shift;\n  return '-C' if $v eq '-C' || $v eq '--clear';\n  return '-V' if $v eq '-V' || $v eq '--version';\n  return '-s' if $v eq '-s' || $v eq '--show-stats';\n  return '-z' if $v eq '-z' || $v eq '--zero-stats';\n  exec(",
                       position: (38, 48),
                      },
                      Raw {
                       content: "'",
                       position: (45, 18),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "pkgs",
                         position: (45, 21),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "ccache",
                           position: (45, 26),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: "/bin/ccache', '-h');\n}\nexec(",
                       position: (45, 33),
                      },
                      Raw {
                       content: "'",
                       position: (47, 16),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "pkgs",
                         position: (47, 19),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "ccache",
                           position: (47, 24),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: "/bin/ccache', map { untaint $_ } @ARGV);\n",
                       position: (47, 31),
                      },
                     ],
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (30, 38),
               },
              ),
             ],
             recursive: false,
             position: (26, 22),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "mkIf",
            position: (53, 6),
           },
           arguments: [
            BinaryOperation {
             operator: NotEqualTo,
             operands: [
              PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (53, 12),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "packageNames",
                  position: (53, 16),
                 },
                ],
               },
               default: None,
              },
              List {
               elements: [],
               position: (53, 32),
              },
             ],
             position: (53, 29),
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "nixpkgs",
                  position: (54, 7),
                 },
                 Raw {
                  content: "overlays",
                  position: (54, 15),
                 },
                ],
               },
               List {
                elements: [
                 Function {
                  argument: Some(
                   "self",
                  ),
                  arguments: FunctionArguments {
                   arguments: [],
                   ellipsis: false,
                  },
                  definition: Function {
                   argument: Some(
                    "super",
                   ),
                   arguments: FunctionArguments {
                    arguments: [],
                    ellipsis: false,
                   },
                   definition: FunctionApplication {
                    function: Variable {
                     identifier: "genAttrs",
                     position: (55, 23),
                    },
                    arguments: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (55, 32),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "packageNames",
                         position: (55, 36),
                        },
                       ],
                      },
                      default: None,
                     },
                     Function {
                      argument: Some(
                       "pn",
                      ),
                      arguments: FunctionArguments {
                       arguments: [],
                       ellipsis: false,
                      },
                      definition: FunctionApplication {
                       function: PropertyAccess {
                        expression: Variable {
                         identifier: "super",
                         position: (55, 54),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Expression {
                           expression: Variable {
                            identifier: "pn",
                            position: (55, 62),
                           },
                          },
                          Raw {
                           content: "override",
                           position: (55, 66),
                          },
                         ],
                        },
                        default: None,
                       },
                       arguments: [
                        Map {
                         bindings: [
                          KeyValue(
                           AttributePath {
                            attributes: [
                             Raw {
                              content: "stdenv",
                              position: (55, 77),
                             },
                            ],
                           },
                           FunctionApplication {
                            function: PropertyAccess {
                             expression: Variable {
                              identifier: "builtins",
                              position: (55, 86),
                             },
                             attribute_path: AttributePath {
                              attributes: [
                               Raw {
                                content: "trace",
                                position: (55, 95),
                               },
                              ],
                             },
                             default: None,
                            },
                            arguments: [
                             String {
                              parts: [
                               Raw {
                                content: "with ccache: ",
                                position: (55, 102),
                               },
                               Expression {
                                expression: Variable {
                                 identifier: "pn",
                                 position: (55, 117),
                                },
                               },
                              ],
                             },
                             PropertyAccess {
                              expression: Variable {
                               identifier: "self",
                               position: (55, 122),
                              },
                              attribute_path: AttributePath {
                               attributes: [
                                Raw {
                                 content: "ccacheStdenv",
                                 position: (55, 127),
                                },
                               ],
                              },
                              default: None,
                             },
                            ],
                           },
                          ),
                         ],
                         recursive: false,
                         position: (55, 75),
                        },
                       ],
                      },
                      position: (55, 50),
                     },
                    ],
                   },
                   position: (55, 16),
                  },
                  position: (55, 10),
                 },
                 Function {
                  argument: Some(
                   "self",
                  ),
                  arguments: FunctionArguments {
                   arguments: [],
                   ellipsis: false,
                  },
                  definition: Function {
                   argument: Some(
                    "super",
                   ),
                   arguments: FunctionArguments {
                    arguments: [],
                    ellipsis: false,
                   },
                   definition: Map {
                    bindings: [
                     KeyValue(
                      AttributePath {
                       attributes: [
                        Raw {
                         content: "ccacheWrapper",
                         position: (58, 11),
                        },
                       ],
                      },
                      FunctionApplication {
                       function: PropertyAccess {
                        expression: Variable {
                         identifier: "super",
                         position: (58, 27),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "ccacheWrapper",
                           position: (58, 33),
                          },
                          Raw {
                           content: "override",
                           position: (58, 47),
                          },
                         ],
                        },
                        default: None,
                       },
                       arguments: [
                        Map {
                         bindings: [
                          KeyValue(
                           AttributePath {
                            attributes: [
                             Raw {
                              content: "extraConfig",
                              position: (59, 13),
                             },
                            ],
                           },
                           String {
                            parts: [
                             Raw {
                              content: "export CCACHE_COMPRESS=1\nexport CCACHE_DIR=\"",
                              position: (60, 1),
                             },
                             Expression {
                              expression: PropertyAccess {
                               expression: Variable {
                                identifier: "cfg",
                                position: (61, 36),
                               },
                               attribute_path: AttributePath {
                                attributes: [
                                 Raw {
                                  content: "cacheDir",
                                  position: (61, 40),
                                 },
                                ],
                               },
                               default: None,
                              },
                             },
                             Raw {
                              content: "\"\nexport CCACHE_UMASK=007\nif [ ! -d \"$CCACHE_DIR\" ]; then\n  echo \"=====\"\n  echo \"Directory ",
                              position: (61, 49),
                             },
                             Raw {
                              content: "'",
                              position: (65, 33),
                             },
                             Raw {
                              content: "$CCACHE_DIR' does not exist\"\n  echo \"Please create it with:\"\n  echo \"  sudo mkdir -m0770 ",
                              position: (65, 34),
                             },
                             Raw {
                              content: "'",
                              position: (67, 43),
                             },
                             Raw {
                              content: "$CCACHE_DIR'\"\n  echo \"  sudo chown root:nixbld ",
                              position: (67, 44),
                             },
                             Raw {
                              content: "'",
                              position: (68, 48),
                             },
                             Raw {
                              content: "$CCACHE_DIR'\"\n  echo \"=====\"\n  exit 1\nfi\nif [ ! -w \"$CCACHE_DIR\" ]; then\n  echo \"=====\"\n  echo \"Directory ",
                              position: (68, 49),
                             },
                             Raw {
                              content: "'",
                              position: (74, 33),
                             },
                             Raw {
                              content: "$CCACHE_DIR' is not accessible for user $(whoami)\"\n  echo \"Please verify its access permissions\"\n  echo \"=====\"\n  exit 1\nfi\n",
                              position: (74, 34),
                             },
                            ],
                           },
                          ),
                         ],
                         recursive: false,
                         position: (58, 56),
                        },
                       ],
                      },
                     ),
                    ],
                    recursive: false,
                    position: (57, 23),
                   },
                   position: (57, 16),
                  },
                  position: (57, 10),
                 },
                ],
                position: (54, 26),
               },
              ),
             ],
             recursive: false,
             position: (53, 36),
            },
           ],
          },
         ],
         position: (24, 20),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (6, 4),
   },
   position: (4, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}