summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorAlexei Colin <ac@alexeicolin.com>2021-01-17 01:29:15 -0500
committerAlexei Colin <ac@alexeicolin.com>2021-01-17 01:29:15 -0500
commit72bebd8c0c4e8fdab99f04e51782ad6687f4881f (patch)
tree47fbc8e7070db29bc1d5c5b6e7a3b717da926d52 /doc
parentc44acaaceb04ab149b805656eeffcdf2acf939e6 (diff)
downloadnixpkgs-72bebd8c0c4e8fdab99f04e51782ad6687f4881f.tar
nixpkgs-72bebd8c0c4e8fdab99f04e51782ad6687f4881f.tar.gz
nixpkgs-72bebd8c0c4e8fdab99f04e51782ad6687f4881f.tar.bz2
nixpkgs-72bebd8c0c4e8fdab99f04e51782ad6687f4881f.tar.lz
nixpkgs-72bebd8c0c4e8fdab99f04e51782ad6687f4881f.tar.xz
nixpkgs-72bebd8c0c4e8fdab99f04e51782ad6687f4881f.tar.zst
nixpkgs-72bebd8c0c4e8fdab99f04e51782ad6687f4881f.zip
doc: rust: fix syntax error in declarative overlay
Otherwise pasting the snippet into shell.nix results in:

	error: syntax error, unexpected '=', expecting $end, at /.../shell.nix:2:9

Signed-off-by: Alexei Colin <ac@alexeicolin.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/languages-frameworks/rust.section.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md
index 092e84461b8..dda8d485365 100644
--- a/doc/languages-frameworks/rust.section.md
+++ b/doc/languages-frameworks/rust.section.md
@@ -567,12 +567,13 @@ in the `~/.config/nixpkgs/overlays` directory.
 Add the following to your `configuration.nix`, `home-configuration.nix`, `shell.nix`, or similar:
 
 ```
-  nixpkgs = {
+{ pkgs ? import <nixpkgs> {
     overlays = [
       (import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz))
       # Further overlays go here
     ];
   };
+};
 ```
 
 Note that this will fetch the latest overlay version when rebuilding your system.