3 The 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/X11 license](https://github.com/NixOS/nixpkgs/blob/master/COPYING).
6 Packages are available for several platforms, and can be used with the Nix
7 package manager on most GNU/Linux distributions as well as [NixOS](https://nixos.org/nixos).
9 This manual primarily describes how to write packages for the Nix Packages collection
10 (Nixpkgs). Thus it’s mainly for packagers and developers who want to add packages to
11 Nixpkgs. If you like to learn more about the Nix package manager and the Nix
12 expression language, then you are kindly referred to the [Nix manual](https://nixos.org/nix/manual/).
13 The NixOS distribution is documented in the [NixOS manual](https://nixos.org/nixos/manual/).
15 ## Overview of Nixpkgs {#overview-of-nixpkgs}
17 Nix expressions describe how to build packages from source and are collected in
18 the [nixpkgs repository](https://github.com/NixOS/nixpkgs). Also included in the
19 collection are Nix expressions for
20 [NixOS modules](https://nixos.org/nixos/manual/index.html#sec-writing-modules).
21 With these expressions the Nix package manager can build binary packages.
23 Packages, including the Nix packages collection, are distributed through
24 [channels](https://nixos.org/nix/manual/#sec-channels). The collection is
25 distributed for users of Nix on non-NixOS distributions through the channel
26 `nixpkgs`. Users of NixOS generally use one of the `nixos-*` channels, e.g.
27 `nixos-19.09`, which includes all packages and modules for the stable NixOS
28 19.09. Stable NixOS releases are generally only given
29 security updates. More up to date packages and modules are available via the
30 `nixos-unstable` channel.
32 Both `nixos-unstable` and `nixpkgs` follow the `master` branch of the Nixpkgs
33 repository, although both do lag the `master` branch by generally
34 [a couple of days](https://status.nixos.org/). Updates to a channel are
35 distributed as soon as all tests for that channel pass, e.g.
36 [this table](https://hydra.nixos.org/job/nixpkgs/trunk/unstable#tabs-constituents)
37 shows the status of tests for the `nixpkgs` channel.
39 The tests are conducted by a cluster called [Hydra](https://nixos.org/hydra/),
40 which also builds binary packages from the Nix expressions in Nixpkgs for
41 `x86_64-linux`, `i686-linux` and `x86_64-darwin`.
42 The binaries are made available via a [binary cache](https://cache.nixos.org).
44 The current Nix expressions of the channels are available in the
45 [`nixpkgs`](https://github.com/NixOS/nixpkgs) repository in branches
46 that correspond to the channel names (e.g. `nixos-19.09-small`).