NixOS / NixOS/nix.dev

Nix language deep dive (with `nix repl`)

Open
#579 4 comments 0 reactions 1 assignee View on GitHub

@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.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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.