---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "cfg",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: LetIn {
  bindings: [
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "propertyXml",
       position: (3, 3),
      },
     ],
    },
    to: Function {
     argument: Simple {
      identifier: "name",
     },
     definition: Function {
      argument: Simple {
       identifier: "value",
      },
      definition: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "lib",
         position: (3, 30),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "optionalString",
           position: (3, 34),
          },
         ],
        },
        default: None,
       },
       arguments: [
        Parentheses {
         expression: BinaryOperation {
          operator: NotEqualTo,
          operands: [
           Variable {
            identifier: "value",
            position: (3, 50),
           },
           Variable {
            identifier: "null",
            position: (3, 59),
           },
          ],
          position: (3, 56),
         },
         position: (3, 49),
        },
        String {
         parts: [
          Raw {
           content: "<property>\n  <name>",
           position: (4, 1),
          },
          Expression {
           expression: Variable {
            identifier: "name",
            position: (5, 15),
           },
          },
          Raw {
           content: "</name>\n  <value>",
           position: (5, 20),
          },
          Expression {
           expression: FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "builtins",
              position: (6, 16),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "toString",
                position: (6, 25),
               },
              ],
             },
             default: None,
            },
            arguments: [
             Variable {
              identifier: "value",
              position: (6, 34),
             },
            ],
           },
          },
          Raw {
           content: "</value>\n</property>\n",
           position: (6, 40),
          },
         ],
         position: (3, 65),
        },
       ],
      },
      position: (3, 23),
     },
     position: (3, 17),
    },
   },
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "siteXml",
       position: (9, 3),
      },
     ],
    },
    to: Function {
     argument: Simple {
      identifier: "fileName",
     },
     definition: Function {
      argument: Simple {
       identifier: "properties",
      },
      definition: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "pkgs",
         position: (9, 35),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "writeTextDir",
           position: (9, 40),
          },
         ],
        },
        default: None,
       },
       arguments: [
        Variable {
         identifier: "fileName",
         position: (9, 53),
        },
        String {
         parts: [
          Raw {
           content: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- generated by NixOS -->\n<configuration>\n  ",
           position: (10, 1),
          },
          Expression {
           expression: FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "builtins",
              position: (13, 9),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "concatStringsSep",
                position: (13, 18),
               },
              ],
             },
             default: None,
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: "\n",
                position: (13, 36),
               },
              ],
              position: (13, 35),
             },
             Parentheses {
              expression: FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (13, 41),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "lib",
                   position: (13, 46),
                  },
                  Raw {
                   content: "mapAttrsToList",
                   position: (13, 50),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                Variable {
                 identifier: "propertyXml",
                 position: (13, 65),
                },
                Variable {
                 identifier: "properties",
                 position: (13, 77),
                },
               ],
              },
              position: (13, 40),
             },
            ],
           },
          },
          Raw {
           content: "\n</configuration>\n",
           position: (13, 89),
          },
         ],
         position: (9, 62),
        },
       ],
      },
      position: (9, 23),
     },
     position: (9, 13),
    },
   },
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "cfgLine",
       position: (16, 3),
      },
     ],
    },
    to: Function {
     argument: Simple {
      identifier: "name",
     },
     definition: Function {
      argument: Simple {
       identifier: "value",
      },
      definition: String {
       parts: [
        Raw {
         content: "",
         position: (17, 1),
        },
        Expression {
         expression: Variable {
          identifier: "name",
          position: (17, 7),
         },
        },
        Raw {
         content: "=",
         position: (17, 12),
        },
        Expression {
         expression: FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "builtins",
            position: (17, 15),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "toString",
              position: (17, 24),
             },
            ],
           },
           default: None,
          },
          arguments: [
           Variable {
            identifier: "value",
            position: (17, 33),
           },
          ],
         },
        },
        Raw {
         content: "\n",
         position: (17, 39),
        },
       ],
       position: (16, 26),
      },
      position: (16, 19),
     },
     position: (16, 13),
    },
   },
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "cfgFile",
       position: (19, 3),
      },
     ],
    },
    to: Function {
     argument: Simple {
      identifier: "fileName",
     },
     definition: Function {
      argument: Simple {
       identifier: "properties",
      },
      definition: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "pkgs",
         position: (19, 35),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "writeTextDir",
           position: (19, 40),
          },
         ],
        },
        default: None,
       },
       arguments: [
        Variable {
         identifier: "fileName",
         position: (19, 53),
        },
        String {
         parts: [
          Raw {
           content: "# generated by NixOS\n",
           position: (20, 1),
          },
          Expression {
           expression: FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "builtins",
              position: (21, 7),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "concatStringsSep",
                position: (21, 16),
               },
              ],
             },
             default: None,
            },
            arguments: [
             String {
              parts: [],
              position: (21, 33),
             },
             Parentheses {
              expression: FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (21, 37),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "lib",
                   position: (21, 42),
                  },
                  Raw {
                   content: "mapAttrsToList",
                   position: (21, 46),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                Variable {
                 identifier: "cfgLine",
                 position: (21, 61),
                },
                Variable {
                 identifier: "properties",
                 position: (21, 69),
                },
               ],
              },
              position: (21, 36),
             },
            ],
           },
          },
          Raw {
           content: "\n",
           position: (21, 81),
          },
         ],
         position: (19, 62),
        },
       ],
      },
      position: (19, 23),
     },
     position: (19, 13),
    },
   },
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "userFunctions",
       position: (23, 3),
      },
     ],
    },
    to: String {
     parts: [
      Raw {
       content: "hadoop_verify_logdir() {\n  echo Skipping verification of log directory\n}\n",
       position: (24, 1),
      },
     ],
     position: (23, 19),
    },
   },
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "hadoopEnv",
       position: (28, 3),
      },
     ],
    },
    to: String {
     parts: [
      Raw {
       content: "export HADOOP_LOG_DIR=/tmp/hadoop/$USER\n",
       position: (29, 1),
      },
     ],
     position: (28, 15),
    },
   },
  ],
  target: FunctionApplication {
   function: PropertyAccess {
    expression: Variable {
     identifier: "pkgs",
     position: (32, 1),
    },
    attribute_path: AttributePath {
     parts: [
      Raw {
       content: "runCommand",
       position: (32, 6),
      },
     ],
    },
    default: None,
   },
   arguments: [
    String {
     parts: [
      Raw {
       content: "hadoop-conf",
       position: (32, 18),
      },
     ],
     position: (32, 17),
    },
    Map {
     bindings: [],
     recursive: false,
     position: (32, 31),
    },
    Parentheses {
     expression: With {
      expression: Variable {
       identifier: "cfg",
       position: (32, 40),
      },
      target: String {
       parts: [
        Raw {
         content: "mkdir -p $out/\ncp ",
         position: (33, 1),
        },
        Expression {
         expression: FunctionApplication {
          function: Variable {
           identifier: "siteXml",
           position: (34, 8),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "core-site.xml",
              position: (34, 17),
             },
            ],
            position: (34, 16),
           },
           Parentheses {
            expression: BinaryOperation {
             operator: Update,
             operands: [
              Variable {
               identifier: "coreSite",
               position: (34, 33),
              },
              Variable {
               identifier: "coreSiteInternal",
               position: (34, 45),
              },
             ],
             position: (34, 42),
            },
            position: (34, 32),
           },
          ],
         },
        },
        Raw {
         content: "/* $out/\ncp ",
         position: (34, 63),
        },
        Expression {
         expression: FunctionApplication {
          function: Variable {
           identifier: "siteXml",
           position: (35, 8),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "hdfs-site.xml",
              position: (35, 17),
             },
            ],
            position: (35, 16),
           },
           Parentheses {
            expression: BinaryOperation {
             operator: Update,
             operands: [
              Variable {
               identifier: "hdfsSiteDefault",
               position: (35, 33),
              },
              BinaryOperation {
               operator: Update,
               operands: [
                Variable {
                 identifier: "hdfsSite",
                 position: (35, 52),
                },
                Variable {
                 identifier: "hdfsSiteInternal",
                 position: (35, 64),
                },
               ],
               position: (35, 61),
              },
             ],
             position: (35, 49),
            },
            position: (35, 32),
           },
          ],
         },
        },
        Raw {
         content: "/* $out/\ncp ",
         position: (35, 82),
        },
        Expression {
         expression: FunctionApplication {
          function: Variable {
           identifier: "siteXml",
           position: (36, 8),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "mapred-site.xml",
              position: (36, 17),
             },
            ],
            position: (36, 16),
           },
           Parentheses {
            expression: BinaryOperation {
             operator: Update,
             operands: [
              Variable {
               identifier: "mapredSiteDefault",
               position: (36, 35),
              },
              Variable {
               identifier: "mapredSite",
               position: (36, 56),
              },
             ],
             position: (36, 53),
            },
            position: (36, 34),
           },
          ],
         },
        },
        Raw {
         content: "/* $out/\ncp ",
         position: (36, 68),
        },
        Expression {
         expression: FunctionApplication {
          function: Variable {
           identifier: "siteXml",
           position: (37, 8),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "yarn-site.xml",
              position: (37, 17),
             },
            ],
            position: (37, 16),
           },
           Parentheses {
            expression: BinaryOperation {
             operator: Update,
             operands: [
              Variable {
               identifier: "yarnSiteDefault",
               position: (37, 33),
              },
              BinaryOperation {
               operator: Update,
               operands: [
                Variable {
                 identifier: "yarnSite",
                 position: (37, 52),
                },
                Variable {
                 identifier: "yarnSiteInternal",
                 position: (37, 64),
                },
               ],
               position: (37, 61),
              },
             ],
             position: (37, 49),
            },
            position: (37, 32),
           },
          ],
         },
        },
        Raw {
         content: "/* $out/\ncp ",
         position: (37, 82),
        },
        Expression {
         expression: FunctionApplication {
          function: Variable {
           identifier: "siteXml",
           position: (38, 8),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "httpfs-site.xml",
              position: (38, 17),
             },
            ],
            position: (38, 16),
           },
           Variable {
            identifier: "httpfsSite",
            position: (38, 34),
           },
          ],
         },
        },
        Raw {
         content: "/* $out/\ncp ",
         position: (38, 45),
        },
        Expression {
         expression: FunctionApplication {
          function: Variable {
           identifier: "cfgFile",
           position: (39, 8),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "container-executor.cfg",
              position: (39, 17),
             },
            ],
            position: (39, 16),
           },
           Variable {
            identifier: "containerExecutorCfg",
            position: (39, 41),
           },
          ],
         },
        },
        Raw {
         content: "/* $out/\ncp ",
         position: (39, 62),
        },
        Expression {
         expression: FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "pkgs",
            position: (40, 8),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "writeTextDir",
              position: (40, 13),
             },
            ],
           },
           default: None,
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "hadoop-user-functions.sh",
              position: (40, 27),
             },
            ],
            position: (40, 26),
           },
           Variable {
            identifier: "userFunctions",
            position: (40, 53),
           },
          ],
         },
        },
        Raw {
         content: "/* $out/\ncp ",
         position: (40, 67),
        },
        Expression {
         expression: FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "pkgs",
            position: (41, 8),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "writeTextDir",
              position: (41, 13),
             },
            ],
           },
           default: None,
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "hadoop-env.sh",
              position: (41, 27),
             },
            ],
            position: (41, 26),
           },
           Variable {
            identifier: "hadoopEnv",
            position: (41, 42),
           },
          ],
         },
        },
        Raw {
         content: "/* $out/\ncp ",
         position: (41, 52),
        },
        Expression {
         expression: Variable {
          identifier: "log4jProperties",
          position: (42, 8),
         },
        },
        Raw {
         content: " $out/log4j.properties\n",
         position: (42, 24),
        },
        Expression {
         expression: FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "lib",
            position: (43, 5),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "concatMapStringsSep",
              position: (43, 9),
             },
            ],
           },
           default: None,
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "\n",
              position: (43, 30),
             },
            ],
            position: (43, 29),
           },
           Parentheses {
            expression: Function {
             argument: Simple {
              identifier: "dir",
             },
             definition: String {
              parts: [
               Raw {
                content: "cp -r ",
                position: (43, 41),
               },
               Expression {
                expression: Variable {
                 identifier: "dir",
                 position: (43, 49),
                },
               },
               Raw {
                content: "/* $out/",
                position: (43, 53),
               },
              ],
              position: (43, 40),
             },
             position: (43, 35),
            },
            position: (43, 34),
           },
           Variable {
            identifier: "extraConfDirs",
            position: (43, 64),
           },
          ],
         },
        },
        Raw {
         content: "\n",
         position: (43, 78),
        },
       ],
       position: (32, 45),
      },
      position: (32, 35),
     },
     position: (32, 34),
    },
   ],
  },
  position: (2, 1),
 },
 position: (1, 1),
}