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.
Tutorial contents
- Provide the reader with a functioning
shell.nix that 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
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.Tutorial contents
shell.nixthat builds a Python environmentpython.withPackagesHow