Nix language primer with `shell.nix`
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
The Learning Journey WG identified that the second tutorial in the learning journey should be a tutorial walking the user through creating a shell.nix. This is the tracking issue for discussion on this tutorial and related work.
- Compile a survey of
shell.nixtutorials (@khaled) - Consider if there are elements of existing tutorials that we should include
- 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 small, functioning
shell.nixinstalling Python - Explain that once you've experimented with packages via
nix-shell -pyou can enter the same environment repeatedly by declaring it in ashell.nixfile. - You can also use
shell.nixto configure other aspects of the environment:- Environment variables
- Shell hooks
- Shell prompts
- Illustrate how to add packages to the shell, explaining the basic differences between
buildInputsandpackages - This
shell.nixwill just grab nixpkgs from<nixpkgs>, leaving pinning, channels, etc to later tutorials
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.