Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ch05-01-language-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ nix-repl> a.count
5

# Shorthand for nested attribute sets
nix-repl> :p { foo.bar.baz = 1; foo.bar.buzz = 2; }
{ foo = { bar = { baz = 1; buzz = 2; }; }; }
nix-repl> { foo.bar.baz = 1; foo.bar.buzz = 2; } == { foo = { bar = { baz = 1; buzz = 2; }; }; }
true
```

You will commonly see empty attr sets in nixpkgs, an example being:
Expand Down
6 changes: 3 additions & 3 deletions src/ch05-03-imports-and-callpackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ then it will assume `<directory>/default.nix` was the desired file.
$ cat data.nix
{ a = "foo"; b = "bar"; }

nix-repl> :p import ./data.nix
nix-repl> import ./data.nix
{ a = "foo"; b = "bar"; }

$ cat expression.nix
5+2

nix-repl> :p import ./expression.nix
nix-repl> import ./expression.nix
7
```

Expand All @@ -24,7 +24,7 @@ This still extends to functions:
$ cat function.nix
{ x, y }: x + y

nix-repl> :p import ./function.nix { x = 2; y = 9; }
nix-repl> import ./function.nix { x = 2; y = 9; }
11
```

Expand Down