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