Nix language deep dive (with `nix repl`)
Open
@roberth is already working on this.
Since Jun 19, 2023.
guide (2)
tracking
- Dominant language
- Nix
- Stars
- 4k
- Forks
- 339
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 7
Description
As part of the tutorial series being worked on by the Learning Journey WG we need a tutorial going over the Nix language. We recognize that there's an existing tutorial on nix.dev (Nix language basics). The existing guide is very thorough and we don't want to supplant that guide, but for the purposes of a quick introduction we want a short guide motivated by explaining a real piece of Nix code such as a functioning shell.nix.
- Prepare an outline of the tutorial
- Prepare a draft of the tutorial
- Submit the draft as a PR
Tutorial contents
- Provide the reader with a functioning
shell.nixthat builds a Python environment - This example should have enough complexity to illustrate basic language features:
- Function definitions (the whole file is a function definition)
- Function application
- Passing anonymous functions as arguments via
python.withPackages - Variables, lists, attribute sets, etc
- Navigating attribute sets via the dot operator
- etc
How
- Where to put the result: A new file in https://github.com/NixOS/nix.dev/tree/master/source/tutorials
- Person to contact for help:
- Technical: @infinisil
- Editorial: @zmitchell
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.