---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Inherit {
     from: Some(
      Variable {
       identifier: "pkgs",
       position: (5, 14),
      },
     ),
     attributes: [
      Raw {
       content: "writeScript",
       position: (5, 20),
      },
     ],
    },
   ],
   target: LetIn {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "pkgs2storeContents",
         position: (8, 2),
        },
       ],
      },
      to: Function {
       argument: Simple {
        identifier: "l",
       },
       definition: FunctionApplication {
        function: Variable {
         identifier: "map",
         position: (8, 27),
        },
        arguments: [
         Parentheses {
          expression: Function {
           argument: Simple {
            identifier: "x",
           },
           definition: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "object",
                 position: (8, 37),
                },
               ],
              },
              to: Variable {
               identifier: "x",
               position: (8, 46),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "symlink",
                 position: (8, 49),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "none",
                 position: (8, 60),
                },
               ],
               position: (8, 59),
              },
             },
            ],
            recursive: false,
            position: (8, 35),
           },
           position: (8, 32),
          },
          position: (8, 31),
         },
         Variable {
          identifier: "l",
          position: (8, 70),
         },
        ],
       },
       position: (8, 23),
      },
     },
    ],
    target: Map {
     bindings: [
      Binding {
       from: AttributePath {
        parts: [
         Raw {
          content: "imports",
          position: (12, 3),
         },
        ],
       },
       to: List {
        elements: [
         Path {
          parts: [
           Raw {
            content: "../installer/cd-dvd/channel.nix",
            position: (13, 5),
           },
          ],
          position: (13, 5),
         },
         Path {
          parts: [
           Raw {
            content: "./minimal.nix",
            position: (14, 5),
           },
          ],
          position: (14, 5),
         },
         Path {
          parts: [
           Raw {
            content: "./clone-config.nix",
            position: (15, 5),
           },
          ],
          position: (15, 5),
         },
        ],
        position: (12, 13),
       },
      },
      Binding {
       from: AttributePath {
        parts: [
         Raw {
          content: "system",
          position: (19, 3),
         },
         Raw {
          content: "build",
          position: (19, 10),
         },
         Raw {
          content: "tarball",
          position: (19, 16),
         },
        ],
       },
       to: FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (19, 26),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "callPackage",
            position: (19, 31),
           },
          ],
         },
         default: None,
        },
        arguments: [
         Path {
          parts: [
           Raw {
            content: "../../lib/make-system-tarball.nix",
            position: (19, 43),
           },
          ],
          position: (19, 43),
         },
         Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "contents",
               position: (20, 5),
              },
             ],
            },
            to: List {
             elements: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "source",
                    position: (22, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "config",
                      position: (22, 21),
                     },
                     attribute_path: AttributePath {
                      parts: [
                       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),
                   },
                  ],
                  position: (22, 18),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "target",
                    position: (23, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "./",
                    position: (23, 19),
                   },
                  ],
                  position: (23, 18),
                 },
                },
               ],
               recursive: false,
               position: (21, 7),
              },
             ],
             position: (20, 16),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "extraArgs",
               position: (26, 5),
              },
             ],
            },
            to: String {
             parts: [
              Raw {
               content: "--owner=0",
               position: (26, 18),
              },
             ],
             position: (26, 17),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "storeContents",
               position: (29, 5),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "pkgs2storeContents",
              position: (29, 21),
             },
             arguments: [
              List {
               elements: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "config",
                  position: (30, 7),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   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 {
                  parts: [
                   Raw {
                    content: "stdenv",
                    position: (31, 12),
                   },
                  ],
                 },
                 default: None,
                },
               ],
               position: (29, 40),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "extraCommands",
               position: (35, 5),
              },
             ],
            },
            to: LetIn {
             bindings: [
              Binding {
               from: AttributePath {
                parts: [
                 Raw {
                  content: "script",
                  position: (36, 11),
                 },
                ],
               },
               to: FunctionApplication {
                function: Variable {
                 identifier: "writeScript",
                 position: (36, 20),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: "extra-commands.sh",
                    position: (36, 33),
                   },
                  ],
                  position: (36, 32),
                 },
                 String {
                  parts: [
                   Raw {
                    content: "rm etc\nmkdir -p proc sys dev etc\n",
                    position: (37, 1),
                   },
                  ],
                  position: (36, 52),
                 },
                ],
               },
              },
             ],
             target: Variable {
              identifier: "script",
              position: (40, 10),
             },
             position: (36, 7),
            },
           },
          ],
          recursive: false,
          position: (19, 77),
         },
        ],
       },
      },
      Binding {
       from: AttributePath {
        parts: [
         Raw {
          content: "boot",
          position: (43, 3),
         },
         Raw {
          content: "isContainer",
          position: (43, 8),
         },
        ],
       },
       to: Variable {
        identifier: "true",
        position: (43, 22),
       },
      },
      Binding {
       from: AttributePath {
        parts: [
         Raw {
          content: "boot",
          position: (44, 3),
         },
         Raw {
          content: "postBootCommands",
          position: (44, 8),
         },
        ],
       },
       to: 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 {
            parts: [
             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 {
            parts: [
             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),
         },
        ],
        position: (45, 5),
       },
      },
      Binding {
       from: AttributePath {
        parts: [
         Raw {
          content: "system",
          position: (58, 3),
         },
         Raw {
          content: "activationScripts",
          position: (58, 10),
         },
         Raw {
          content: "installInitScript",
          position: (58, 28),
         },
        ],
       },
       to: String {
        parts: [
         Raw {
          content: "ln -fs $systemConfig/init /init\n",
          position: (59, 1),
         },
        ],
        position: (58, 48),
       },
      },
     ],
     recursive: false,
     position: (10, 4),
    },
    position: (7, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}