Function( Function { head: Destructured( FunctionHeadDestructured { ellipsis: true, identifier: None, arguments: [ FunctionHeadDestructuredArgument { identifier: "config", default: None, }, FunctionHeadDestructuredArgument { identifier: "lib", default: None, }, FunctionHeadDestructuredArgument { identifier: "pkgs", default: None, }, ], }, ), body: With( With { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 6, column: 6, }, end: Position { line: 6, column: 9, }, }, }, ), target: LetIn( LetIn { bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "nixpkgs", span: Span { start: Position { line: 9, column: 3, }, end: Position { line: 9, column: 10, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 9, column: 13, }, end: Position { line: 9, column: 16, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "cleanSource", span: Span { start: Position { line: 9, column: 17, }, end: Position { line: 9, column: 28, }, }, }, ), ], default: None, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 9, column: 29, }, end: Position { line: 9, column: 33, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "path", span: Span { start: Position { line: 9, column: 34, }, end: Position { line: 9, column: 38, }, }, }, ), ], default: None, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "channelSources", span: Span { start: Position { line: 15, column: 3, }, end: Position { line: 15, column: 17, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 15, column: 20, }, end: Position { line: 15, column: 24, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "runCommand", span: Span { start: Position { line: 15, column: 25, }, end: Position { line: 15, column: 35, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "nixos-", span: Span { start: Position { line: 15, column: 37, }, end: Position { line: 15, column: 73, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 15, column: 45, }, end: Position { line: 15, column: 51, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "system", span: Span { start: Position { line: 15, column: 52, }, end: Position { line: 15, column: 58, }, }, }, ), Raw( PartRaw { content: "nixos", span: Span { start: Position { line: 15, column: 59, }, end: Position { line: 15, column: 64, }, }, }, ), Raw( PartRaw { content: "version", span: Span { start: Position { line: 15, column: 65, }, end: Position { line: 15, column: 72, }, }, }, ), ], default: None, }, ), }, ), ], span: Span { start: Position { line: 15, column: 36, }, end: Position { line: 15, column: 74, }, }, }, ), Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "preferLocalBuild", span: Span { start: Position { line: 16, column: 7, }, end: Position { line: 16, column: 23, }, }, }, ), ], to: Identifier( Identifier { id: "true", span: Span { start: Position { line: 16, column: 26, }, end: Position { line: 16, column: 30, }, }, }, ), }, ), ], span: Span { start: Position { line: 16, column: 5, }, end: Position { line: 16, column: 33, }, }, }, ), IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "mkdir -p $out\ncp -prd ", span: Span { start: Position { line: 18, column: 1, }, end: Position { line: 19, column: 15, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "nixpkgs", span: Span { start: Position { line: 19, column: 17, }, end: Position { line: 19, column: 24, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "outPath", span: Span { start: Position { line: 19, column: 25, }, end: Position { line: 19, column: 32, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: " $out/nixos\nchmod -R u+w $out/nixos\nif [ ! -e $out/nixos/nixpkgs ]; then\n ln -s . $out/nixos/nixpkgs\nfi\n", span: Span { start: Position { line: 18, column: 1, }, end: Position { line: 24, column: 7, }, }, }, ), Interpolation( PartInterpolation { expression: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "optionalString", span: Span { start: Position { line: 24, column: 9, }, end: Position { line: 24, column: 23, }, }, }, ), arguments: [ BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 24, column: 25, }, end: Position { line: 24, column: 31, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "system", span: Span { start: Position { line: 24, column: 32, }, end: Position { line: 24, column: 38, }, }, }, ), Raw( PartRaw { content: "nixos", span: Span { start: Position { line: 24, column: 39, }, end: Position { line: 24, column: 44, }, }, }, ), Raw( PartRaw { content: "revision", span: Span { start: Position { line: 24, column: 45, }, end: Position { line: 24, column: 53, }, }, }, ), ], default: None, }, ), operator: NotEqualTo, right: Identifier( Identifier { id: "null", span: Span { start: Position { line: 24, column: 57, }, end: Position { line: 24, column: 61, }, }, }, ), }, ), IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "echo -n ", span: Span { start: Position { line: 25, column: 1, }, end: Position { line: 25, column: 17, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 25, column: 19, }, end: Position { line: 25, column: 25, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "system", span: Span { start: Position { line: 25, column: 26, }, end: Position { line: 25, column: 32, }, }, }, ), Raw( PartRaw { content: "nixos", span: Span { start: Position { line: 25, column: 33, }, end: Position { line: 25, column: 38, }, }, }, ), Raw( PartRaw { content: "revision", span: Span { start: Position { line: 25, column: 39, }, end: Position { line: 25, column: 47, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: " > $out/nixos/.git-revision\n", span: Span { start: Position { line: 25, column: 1, }, end: Position { line: 26, column: 7, }, }, }, ), ], span: Span { start: Position { line: 24, column: 63, }, end: Position { line: 26, column: 9, }, }, }, ), ], }, ), }, ), Raw( PartRaw { content: "\necho -n ", span: Span { start: Position { line: 18, column: 1, }, end: Position { line: 27, column: 15, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 27, column: 17, }, end: Position { line: 27, column: 23, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "system", span: Span { start: Position { line: 27, column: 24, }, end: Position { line: 27, column: 30, }, }, }, ), Raw( PartRaw { content: "nixos", span: Span { start: Position { line: 27, column: 31, }, end: Position { line: 27, column: 36, }, }, }, ), Raw( PartRaw { content: "versionSuffix", span: Span { start: Position { line: 27, column: 37, }, end: Position { line: 27, column: 50, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: " > $out/nixos/.version-suffix\necho ", span: Span { start: Position { line: 18, column: 1, }, end: Position { line: 28, column: 12, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 28, column: 14, }, end: Position { line: 28, column: 20, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "system", span: Span { start: Position { line: 28, column: 21, }, end: Position { line: 28, column: 27, }, }, }, ), Raw( PartRaw { content: "nixos", span: Span { start: Position { line: 28, column: 28, }, end: Position { line: 28, column: 33, }, }, }, ), Raw( PartRaw { content: "versionSuffix", span: Span { start: Position { line: 28, column: 34, }, end: Position { line: 28, column: 47, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: " | sed -e s/pre// > $out/nixos/svn-revision\n", span: Span { start: Position { line: 18, column: 1, }, end: Position { line: 29, column: 5, }, }, }, ), ], span: Span { start: Position { line: 17, column: 5, }, end: Position { line: 29, column: 7, }, }, }, ), ], }, ), }, ), ], target: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "nix", span: Span { start: Position { line: 34, column: 3, }, end: Position { line: 34, column: 6, }, }, }, ), Raw( PartRaw { content: "registry", span: Span { start: Position { line: 34, column: 7, }, end: Position { line: 34, column: 15, }, }, }, ), Raw( PartRaw { content: "nixpkgs", span: Span { start: Position { line: 34, column: 16, }, end: Position { line: 34, column: 23, }, }, }, ), Raw( PartRaw { content: "flake", span: Span { start: Position { line: 34, column: 24, }, end: Position { line: 34, column: 29, }, }, }, ), Raw( PartRaw { content: "outPath", span: Span { start: Position { line: 34, column: 30, }, end: Position { line: 34, column: 37, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "builtins", span: Span { start: Position { line: 34, column: 40, }, end: Position { line: 34, column: 48, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "path", span: Span { start: Position { line: 34, column: 49, }, end: Position { line: 34, column: 53, }, }, }, ), ], default: None, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "name", span: Span { start: Position { line: 34, column: 56, }, end: Position { line: 34, column: 60, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "source", span: Span { start: Position { line: 34, column: 64, }, end: Position { line: 34, column: 70, }, }, }, ), ], span: Span { start: Position { line: 34, column: 63, }, end: Position { line: 34, column: 71, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "path", span: Span { start: Position { line: 34, column: 73, }, end: Position { line: 34, column: 77, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 34, column: 80, }, end: Position { line: 34, column: 84, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "path", span: Span { start: Position { line: 34, column: 85, }, end: Position { line: 34, column: 89, }, }, }, ), ], default: None, }, ), }, ), ], span: Span { start: Position { line: 34, column: 54, }, end: Position { line: 34, column: 92, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "boot", span: Span { start: Position { line: 37, column: 3, }, end: Position { line: 37, column: 7, }, }, }, ), Raw( PartRaw { content: "postBootCommands", span: Span { start: Position { line: 37, column: 8, }, end: Position { line: 37, column: 24, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkAfter", span: Span { start: Position { line: 37, column: 27, }, end: Position { line: 37, column: 34, }, }, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "if ! [ -e /var/lib/nixos/did-channel-init ]; then\n echo \"unpacking the NixOS/Nixpkgs sources...\"\n mkdir -p /nix/var/nix/profiles/per-user/root\n ", span: Span { start: Position { line: 39, column: 1, }, end: Position { line: 42, column: 9, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 42, column: 11, }, end: Position { line: 42, column: 17, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "nix", span: Span { start: Position { line: 42, column: 18, }, end: Position { line: 42, column: 21, }, }, }, ), Raw( PartRaw { content: "package", span: Span { start: Position { line: 42, column: 22, }, end: Position { line: 42, column: 29, }, }, }, ), Raw( PartRaw { content: "out", span: Span { start: Position { line: 42, column: 30, }, end: Position { line: 42, column: 33, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "/bin/nix-env -p /nix/var/nix/profiles/per-user/root/channels \\\n -i ", span: Span { start: Position { line: 39, column: 1, }, end: Position { line: 43, column: 14, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "channelSources", span: Span { start: Position { line: 43, column: 16, }, end: Position { line: 43, column: 30, }, }, }, ), }, ), Raw( PartRaw { content: " --quiet --option build-use-substitutes false \\\n ", span: Span { start: Position { line: 39, column: 1, }, end: Position { line: 44, column: 11, }, }, }, ), Interpolation( PartInterpolation { expression: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "optionalString", span: Span { start: Position { line: 44, column: 13, }, end: Position { line: 44, column: 27, }, }, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 44, column: 28, }, end: Position { line: 44, column: 34, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "boot", span: Span { start: Position { line: 44, column: 35, }, end: Position { line: 44, column: 39, }, }, }, ), Raw( PartRaw { content: "initrd", span: Span { start: Position { line: 44, column: 40, }, end: Position { line: 44, column: 46, }, }, }, ), Raw( PartRaw { content: "systemd", span: Span { start: Position { line: 44, column: 47, }, end: Position { line: 44, column: 54, }, }, }, ), Raw( PartRaw { content: "enable", span: Span { start: Position { line: 44, column: 55, }, end: Position { line: 44, column: 61, }, }, }, ), ], default: None, }, ), String( String_ { parts: [ Raw( PartRaw { content: "--option sandbox false", span: Span { start: Position { line: 44, column: 63, }, end: Position { line: 44, column: 85, }, }, }, ), ], span: Span { start: Position { line: 44, column: 62, }, end: Position { line: 44, column: 86, }, }, }, ), ], }, ), }, ), Raw( PartRaw { content: " # There's an issue with pivot_root\n mkdir -m 0700 -p /root/.nix-defexpr\n ln -s /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels\n mkdir -m 0755 -p /var/lib/nixos\n touch /var/lib/nixos/did-channel-init\nfi\n", span: Span { start: Position { line: 39, column: 1, }, end: Position { line: 50, column: 5, }, }, }, ), ], span: Span { start: Position { line: 38, column: 5, }, end: Position { line: 50, column: 7, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 33, column: 1, }, end: Position { line: 51, column: 2, }, }, }, ), span: Span { start: Position { line: 8, column: 1, }, end: Position { line: 51, column: 2, }, }, }, ), span: Span { start: Position { line: 6, column: 1, }, end: Position { line: 51, column: 2, }, }, }, ), span: Span { start: Position { line: 4, column: 1, }, end: Position { line: 51, column: 2, }, }, }, )