1# Preface {#preface}
2
3The Nix Packages collection (Nixpkgs) is a set of thousands of packages for the
4[Nix package manager](https://nixos.org/nix/), released under a
5[permissive MIT license](https://github.com/NixOS/nixpkgs/blob/master/COPYING).
6Packages are available for several platforms, and can be used with the Nix
7package manager on most GNU/Linux distributions as well as [NixOS](https://nixos.org/nixos).
8
9This document is the user [_reference_](https://nix.dev/contributing/documentation/diataxis#reference) manual for Nixpkgs.
10It describes the entire public interface of Nixpkgs in a concise and orderly manner, and all relevant behaviors, with examples and cross-references.
11
12To discover other kinds of documentation:
13- [nix.dev](https://nix.dev/): Tutorials and guides for getting things done with Nix
14- [NixOS **Option Search**](https://search.nixos.org/options) and reference documentation
15- [Nixpkgs **Package Search**](https://search.nixos.org/packages)
16- [**NixOS** manual](https://nixos.org/manual/nixos/stable/): Reference documentation for the NixOS Linux distribution
17- [`CONTRIBUTING.md`](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md): Contributing to Nixpkgs, including this manual
18
19## Overview of Nixpkgs {#overview-of-nixpkgs}
20
21Nix expressions describe how to build packages from source and are collected in
22the [nixpkgs repository](https://github.com/NixOS/nixpkgs). Also included in the
23collection are Nix expressions for
24[NixOS modules](https://nixos.org/nixos/manual/index.html#sec-writing-modules).
25With these expressions the Nix package manager can build binary packages.
26
27Packages, including the Nix packages collection, are distributed through
28[channels](https://nixos.org/nix/manual/#sec-channels). The collection is
29distributed for users of Nix on non-NixOS distributions through the channel
30`nixpkgs-unstable`. Users of NixOS generally use one of the `nixos-*` channels,
31e.g. `nixos-22.11`, which includes all packages and modules for the stable NixOS
3222.11. Stable NixOS releases are generally only given
33security updates. More up-to-date packages and modules are available via the
34`nixos-unstable` channel.
35
36Both `nixos-unstable` and `nixpkgs-unstable` follow the `master` branch of the
37nixpkgs repository, although both do lag the `master` branch by generally
38[a couple of days](https://status.nixos.org/). Updates to a channel are
39distributed as soon as all tests for that channel pass, e.g.
40[this table](https://hydra.nixos.org/job/nixpkgs/trunk/unstable#tabs-constituents)
41shows the status of tests for the `nixpkgs-unstable` channel.
42
43The tests are conducted by a cluster called [Hydra](https://nixos.org/hydra/),
44which also builds binary packages from the Nix expressions in Nixpkgs for
45`x86_64-linux`, `aarch64-linux`, `x86_64-darwin` and `aarch64-darwin`.
46The binaries are made available via a [binary cache](https://cache.nixos.org).
47
48The current Nix expressions of the channels are available in the
49[nixpkgs repository](https://github.com/NixOS/nixpkgs) in branches
50that correspond to the channel names (e.g. `nixos-22.11-small`).