summaryrefslogtreecommitdiffhomepage
path: root/nix.html.markdown
diff options
context:
space:
mode:
authorBoris Verkhovskiy <boris.verk@gmail.com>2024-04-03 02:02:49 -0700
committerGitHub <noreply@github.com>2024-04-03 02:02:49 -0700
commit616e40816dfdf90c2418477327729169db0274b3 (patch)
tree0b5ae76e529c34f6648442815f535626eaeebf69 /nix.html.markdown
parent3e22775a641831a82c59a3b6197240b2fcd9a76b (diff)
parent638494ae2a0c089717f2bfff965da52e3b15a4f9 (diff)
Merge branch 'master' into elixir-casing
Diffstat (limited to 'nix.html.markdown')
-rw-r--r--nix.html.markdown5
1 files changed, 4 insertions, 1 deletions
diff --git a/nix.html.markdown b/nix.html.markdown
index 1d5a7778..c2a2c074 100644
--- a/nix.html.markdown
+++ b/nix.html.markdown
@@ -305,6 +305,9 @@ with builtins; [
({x, y, ...}: x + "-" + y) { x = "a"; y = "b"; z = "c"; }
#=> "a-b"
+ # The entire set can be bound to a variable using `@`
+ (args@{x, y}: args.x + "-" + args.y) { x = "a"; y = "b"; }
+ #=> "a-b"
# Errors
#=========================================
@@ -355,7 +358,7 @@ with builtins; [
# its contents. You can read files from anywhere. In this example,
# we write a file into the store, and then read it back out.
(let filename = toFile "foo.txt" "hello!"; in
- [filename (builtins.readFile filename)])
+ [filename (readFile filename)])
#=> [ "/nix/store/ayh05aay2anx135prqp0cy34h891247x-foo.txt" "hello!" ]
# We can also download files into the Nix store.