---
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: (3, 6),
  },
  target: LetIn {
   bindings: [
    Inherit(
     Some(
      Variable {
       identifier: "pkgs",
       position: (5, 14),
      },
     ),
     [
      Raw {
       content: "writeScript",
       position: (5, 20),
      },
     ],
    ),
   ],
   target: LetIn {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "pkgs2storeContents",
         position: (8, 2),
        },
       ],
      },
      Function {
       argument: Some(
        "l",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: FunctionApplication {
        function: Variable {
         identifier: "map",
         position: (8, 27),
        },
        arguments: [
         Function {
          argument: Some(
           "x",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "object",
                position: (8, 37),
               },
              ],
             },
             Variable {
              identifier: "x",
              position: (8, 46),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "symlink",
                position: (8, 49),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "none",
                position: (8, 60),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (8, 35),
          },
          position: (8, 32),
         },
         Variable {
          identifier: "l",
          position: (8, 70),
         },
        ],
       },
       position: (8, 23),
      },
     ),
    ],
    target: Map {
     bindings: [
      KeyValue(
       AttributePath {
        attributes: [
         Raw {
          content: "imports",
          position: (12, 3),
         },
        ],
       },
       List {
        elements: [
         Path {
          parts: [
           Raw {
            content: "../installer/cd-dvd/channel.nix",
            position: (13, 5),
           },
          ],
         },
         Path {
          parts: [
           Raw {
            content: "./minimal.nix",
            position: (14, 5),
           },
          ],
         },
         Path {
          parts: [
           Raw {
            content: "./clone-config.nix",
            position: (15, 5),
           },
          ],
         },
        ],
        position: (12, 13),
       },
      ),
      KeyValue(
       AttributePath {
        attributes: [
         Raw {
          content: "system",
          position: (19, 3),
         },
         Raw {
          content: "build",
          position: (19, 10),
         },
         Raw {
          content: "tarball",
          position: (19, 16),
         },
        ],
       },
       FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (19, 26),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "callPackage",
            position: (19, 31),
           },
          ],
         },
         default: None,
        },
        arguments: [
         Path {
          parts: [
           Raw {
            content: "../../lib/make-system-tarball.nix",
            position: (19, 43),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "contents",
               position: (20, 5),
              },
             ],
            },
            List {
             elements: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "source",
                    position: (22, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "config",
                      position: (22, 21),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "system",
                        position: (22, 28),
                       },
                       Raw {
                        content: "build",
                        position: (22, 35),
                       },
                       Raw {
                        content: "toplevel",
                        position: (22, 41),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/.",
                    position: (22, 50),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "target",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "./",
                    position: (23, 19),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (21, 7),
              },
             ],
             position: (20, 16),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "extraArgs",
               position: (26, 5),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "--owner=0",
               position: (26, 18),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "storeContents",
               position: (29, 5),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "pkgs2storeContents",
              position: (29, 21),
             },
             arguments: [
              List {
               elements: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "config",
                  position: (30, 7),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "system",
                    position: (30, 14),
                   },
                   Raw {
                    content: "build",
                    position: (30, 21),
                   },
                   Raw {
                    content: "toplevel",
                    position: (30, 27),
                   },
                  ],
                 },
                 default: None,
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (31, 7),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "stdenv",
                    position: (31, 12),
                   },
                  ],
                 },
                 default: None,
                },
               ],
               position: (29, 40),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "extraCommands",
               position: (35, 5),
              },
             ],
            },
            LetIn {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "script",
                  position: (36, 11),
                 },
                ],
               },
               FunctionApplication {
                function: Variable {
                 identifier: "writeScript",
                 position: (36, 20),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: "extra-commands.sh",
                    position: (36, 33),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "rm etc\nmkdir -p proc sys dev etc\n",
                    position: (37, 1),
                   },
                  ],
                 },
                ],
               },
              ),
             ],
             target: Variable {
              identifier: "script",
              position: (40, 10),
             },
             position: (36, 7),
            },
           ),
          ],
          recursive: false,
          position: (19, 77),
         },
        ],
       },
      ),
      KeyValue(
       AttributePath {
        attributes: [
         Raw {
          content: "boot",
          position: (43, 3),
         },
         Raw {
          content: "isContainer",
          position: (43, 8),
         },
        ],
       },
       Variable {
        identifier: "true",
        position: (43, 22),
       },
      ),
      KeyValue(
       AttributePath {
        attributes: [
         Raw {
          content: "boot",
          position: (44, 3),
         },
         Raw {
          content: "postBootCommands",
          position: (44, 8),
         },
        ],
       },
       String {
        parts: [
         Raw {
          content: "# After booting, register the contents of the Nix store in the Nix\n# database.\nif [ -f /nix-path-registration ]; then\n  ",
          position: (46, 1),
         },
         Expression {
          expression: PropertyAccess {
           expression: Variable {
            identifier: "config",
            position: (49, 11),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "nix",
              position: (49, 18),
             },
             Raw {
              content: "package",
              position: (49, 22),
             },
             Raw {
              content: "out",
              position: (49, 30),
             },
            ],
           },
           default: None,
          },
         },
         Raw {
          content: "/bin/nix-store --load-db < /nix-path-registration &&\n  rm /nix-path-registration\nfi\n\n# nixos-rebuild also requires a \"system\" profile\n",
          position: (49, 34),
         },
         Expression {
          expression: PropertyAccess {
           expression: Variable {
            identifier: "config",
            position: (54, 9),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "nix",
              position: (54, 16),
             },
             Raw {
              content: "package",
              position: (54, 20),
             },
             Raw {
              content: "out",
              position: (54, 28),
             },
            ],
           },
           default: None,
          },
         },
         Raw {
          content: "/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system\n",
          position: (54, 32),
         },
        ],
       },
      ),
      KeyValue(
       AttributePath {
        attributes: [
         Raw {
          content: "system",
          position: (58, 3),
         },
         Raw {
          content: "activationScripts",
          position: (58, 10),
         },
         Raw {
          content: "installInitScript",
          position: (58, 28),
         },
        ],
       },
       String {
        parts: [
         Raw {
          content: "ln -fs $systemConfig/init /init\n",
          position: (59, 1),
         },
        ],
       },
      ),
     ],
     recursive: false,
     position: (10, 4),
    },
    position: (7, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}