NixOS / NixOS/nix.dev

nomenclature surrounding derivations

Open
#276 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nix
Stars
4k
Forks
339
Avg merge
2d 11h
Merged PRs (30d)
7

Description

There's a lot of ambiguity and confusion surrounding the terms "package" and "derivation" currently. It would be good to provide a consistent set of terminology in this book.

The current situation I see in the community:

  • "package" is vaguely used to refer to "derivations" (with all the multiplicity of meaning inherent there) which fit the intuitive notion of a package in more typical package managers.
  • "derivation" is used to refer to many distinct things in my experience:
    • nix files containing nix expressions invoking the derivation keyword or other functions which wrap it. These are further subdivided by the external interface the code in the file conforms to:
      • callPackage /path/to/file.nix { ... }
      • import /path/to/file.nix { ... }
      • import /path/to/file.nix
    • nix expressions invoking the derivation keyword or other functions which wrap it.
    • nix language values produced by the derivation keyword or other functions which wrap it.
    • *.drv files in the nix store generated from those expressions
    • the build process described by the *.drv file
    • the store object produced by the build process
    • the store path of that store object

We need to set some precedents about how we refer to these concepts. Some overloading is probably appropriate, but not this much.

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.

Research direction

Review the book's existing uses of “package” and “derivation” against the distinct concepts listed in the issue. Done means establishing consistent terminology and precedents for these concepts, including when some overloading is appropriate.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.