---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (5, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (5, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "programs",
         position: (5, 16),
        },
        Raw {
         content: "ccache",
         position: (5, 25),
        },
       ],
      },
      default: None,
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (7, 3),
        },
        Raw {
         content: "programs",
         position: (7, 11),
        },
        Raw {
         content: "ccache",
         position: (7, 20),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (9, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (9, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "CCache",
              position: (9, 30),
             },
            ],
            position: (9, 29),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "cacheDir",
            position: (10, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (10, 16),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (11, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (11, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "path",
                  position: (11, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (12, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "CCache directory",
                 position: (12, 22),
                },
               ],
               position: (12, 21),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (13, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "/var/cache/ccache",
                 position: (13, 18),
                },
               ],
               position: (13, 17),
              },
             },
            ],
            recursive: false,
            position: (10, 25),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "packageNames",
            position: (16, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (16, 20),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (17, 7),
                },
               ],
              },
              to: FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (17, 14),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "listOf",
                   position: (17, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (17, 27),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "str",
                    position: (17, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (18, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "Nix top-level packages to be compiled using CCache",
                 position: (18, 22),
                },
               ],
               position: (18, 21),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (19, 7),
                },
               ],
              },
              to: List {
               elements: [],
               position: (19, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "example",
                 position: (20, 7),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "wxGTK30",
                   position: (20, 20),
                  },
                 ],
                 position: (20, 19),
                },
                String {
                 parts: [
                  Raw {
                   content: "ffmpeg",
                   position: (20, 30),
                  },
                 ],
                 position: (20, 29),
                },
                String {
                 parts: [
                  Raw {
                   content: "libav_all",
                   position: (20, 39),
                  },
                 ],
                 position: (20, 38),
                },
               ],
               position: (20, 17),
              },
             },
            ],
            recursive: false,
            position: (16, 29),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (7, 29),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (24, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkMerge",
        position: (24, 12),
       },
       arguments: [
        List {
         elements: [
          Parentheses {
           expression: FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (26, 6),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (26, 11),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "enable",
                 position: (26, 15),
                },
               ],
              },
              default: None,
             },
             Map {
              bindings: [
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "systemd",
                   position: (27, 7),
                  },
                  Raw {
                   content: "tmpfiles",
                   position: (27, 15),
                  },
                  Raw {
                   content: "rules",
                   position: (27, 24),
                  },
                 ],
                },
                to: List {
                 elements: [
                  String {
                   parts: [
                    Raw {
                     content: "d ",
                     position: (27, 35),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (27, 39),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "cacheDir",
                         position: (27, 43),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: " 0770 root nixbld -",
                     position: (27, 52),
                    },
                   ],
                   position: (27, 34),
                  },
                 ],
                 position: (27, 32),
                },
               },
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "security",
                   position: (30, 7),
                  },
                  Raw {
                   content: "wrappers",
                   position: (30, 16),
                  },
                  Raw {
                   content: "nix-ccache",
                   position: (30, 25),
                  },
                 ],
                },
                to: Map {
                 bindings: [
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "owner",
                      position: (31, 9),
                     },
                    ],
                   },
                   to: String {
                    parts: [
                     Raw {
                      content: "root",
                      position: (31, 18),
                     },
                    ],
                    position: (31, 17),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "group",
                      position: (32, 9),
                     },
                    ],
                   },
                   to: String {
                    parts: [
                     Raw {
                      content: "nixbld",
                      position: (32, 18),
                     },
                    ],
                    position: (32, 17),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "setuid",
                      position: (33, 9),
                     },
                    ],
                   },
                   to: Variable {
                    identifier: "false",
                    position: (33, 18),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "setgid",
                      position: (34, 9),
                     },
                    ],
                   },
                   to: Variable {
                    identifier: "true",
                    position: (34, 18),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "source",
                      position: (35, 9),
                     },
                    ],
                   },
                   to: FunctionApplication {
                    function: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (35, 18),
                     },
                     attribute_path: AttributePath {
                      parts: [
                       Raw {
                        content: "writeScript",
                        position: (35, 23),
                       },
                      ],
                     },
                     default: None,
                    },
                    arguments: [
                     String {
                      parts: [
                       Raw {
                        content: "nix-ccache.pl",
                        position: (35, 36),
                       },
                      ],
                      position: (35, 35),
                     },
                     String {
                      parts: [
                       Raw {
                        content: "#!",
                        position: (36, 1),
                       },
                       Expression {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "pkgs",
                          position: (36, 15),
                         },
                         attribute_path: AttributePath {
                          parts: [
                           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 {
                          parts: [
                           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 {
                          parts: [
                           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 {
                          parts: [
                           Raw {
                            content: "ccache",
                            position: (47, 24),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                       Raw {
                        content: "/bin/ccache', map { untaint $_ } @ARGV);\n",
                        position: (47, 31),
                       },
                      ],
                      position: (35, 51),
                     },
                    ],
                   },
                  },
                 ],
                 recursive: false,
                 position: (30, 38),
                },
               },
              ],
              recursive: false,
              position: (26, 22),
             },
            ],
           },
           position: (26, 5),
          },
          Parentheses {
           expression: FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (53, 6),
            },
            arguments: [
             Parentheses {
              expression: BinaryOperation {
               operator: NotEqualTo,
               operands: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (53, 12),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "packageNames",
                    position: (53, 16),
                   },
                  ],
                 },
                 default: None,
                },
                List {
                 elements: [],
                 position: (53, 32),
                },
               ],
               position: (53, 29),
              },
              position: (53, 11),
             },
             Map {
              bindings: [
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "nixpkgs",
                   position: (54, 7),
                  },
                  Raw {
                   content: "overlays",
                   position: (54, 15),
                  },
                 ],
                },
                to: List {
                 elements: [
                  Parentheses {
                   expression: Function {
                    argument: Simple {
                     identifier: "self",
                    },
                    definition: Function {
                     argument: Simple {
                      identifier: "super",
                     },
                     definition: FunctionApplication {
                      function: Variable {
                       identifier: "genAttrs",
                       position: (55, 23),
                      },
                      arguments: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (55, 32),
                        },
                        attribute_path: AttributePath {
                         parts: [
                          Raw {
                           content: "packageNames",
                           position: (55, 36),
                          },
                         ],
                        },
                        default: None,
                       },
                       Parentheses {
                        expression: Function {
                         argument: Simple {
                          identifier: "pn",
                         },
                         definition: FunctionApplication {
                          function: PropertyAccess {
                           expression: Variable {
                            identifier: "super",
                            position: (55, 54),
                           },
                           attribute_path: AttributePath {
                            parts: [
                             Expression {
                              expression: Variable {
                               identifier: "pn",
                               position: (55, 62),
                              },
                             },
                             Raw {
                              content: "override",
                              position: (55, 66),
                             },
                            ],
                           },
                           default: None,
                          },
                          arguments: [
                           Map {
                            bindings: [
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "stdenv",
                                 position: (55, 77),
                                },
                               ],
                              },
                              to: FunctionApplication {
                               function: PropertyAccess {
                                expression: Variable {
                                 identifier: "builtins",
                                 position: (55, 86),
                                },
                                attribute_path: AttributePath {
                                 parts: [
                                  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),
                                   },
                                  },
                                 ],
                                 position: (55, 101),
                                },
                                PropertyAccess {
                                 expression: Variable {
                                  identifier: "self",
                                  position: (55, 122),
                                 },
                                 attribute_path: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "ccacheStdenv",
                                    position: (55, 127),
                                   },
                                  ],
                                 },
                                 default: None,
                                },
                               ],
                              },
                             },
                            ],
                            recursive: false,
                            position: (55, 75),
                           },
                          ],
                         },
                         position: (55, 50),
                        },
                        position: (55, 49),
                       },
                      ],
                     },
                     position: (55, 16),
                    },
                    position: (55, 10),
                   },
                   position: (55, 9),
                  },
                  Parentheses {
                   expression: Function {
                    argument: Simple {
                     identifier: "self",
                    },
                    definition: Function {
                     argument: Simple {
                      identifier: "super",
                     },
                     definition: Map {
                      bindings: [
                       Binding {
                        from: AttributePath {
                         parts: [
                          Raw {
                           content: "ccacheWrapper",
                           position: (58, 11),
                          },
                         ],
                        },
                        to: FunctionApplication {
                         function: PropertyAccess {
                          expression: Variable {
                           identifier: "super",
                           position: (58, 27),
                          },
                          attribute_path: AttributePath {
                           parts: [
                            Raw {
                             content: "ccacheWrapper",
                             position: (58, 33),
                            },
                            Raw {
                             content: "override",
                             position: (58, 47),
                            },
                           ],
                          },
                          default: None,
                         },
                         arguments: [
                          Map {
                           bindings: [
                            Binding {
                             from: AttributePath {
                              parts: [
                               Raw {
                                content: "extraConfig",
                                position: (59, 13),
                               },
                              ],
                             },
                             to: 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 {
                                  parts: [
                                   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),
                               },
                              ],
                              position: (59, 27),
                             },
                            },
                           ],
                           recursive: false,
                           position: (58, 56),
                          },
                         ],
                        },
                       },
                      ],
                      recursive: false,
                      position: (57, 23),
                     },
                     position: (57, 16),
                    },
                    position: (57, 10),
                   },
                   position: (57, 9),
                  },
                 ],
                 position: (54, 26),
                },
               },
              ],
              recursive: false,
              position: (53, 36),
             },
            ],
           },
           position: (53, 5),
          },
         ],
         position: (24, 20),
        },
       ],
      },
     },
    ],
    recursive: false,
    position: (6, 4),
   },
   position: (4, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}