Nixpkgs: The Package Collection Behind NixOS and the Nix Package Manager
Nix Packages collection & NixOS. Nixpkgs describes how to build tens of thousands of pieces of software and implements a Linux distribution.
At a glance
- What is it?
- Nixpkgs is a single repository that contains over 140,000 software package expressions for the Nix package manager and also implements NixOS, a purely-functional Linux distribution. Engineers interact with it either as a package source for the Nix package manager or as the definition layer for a complete operating system.
- Who is it for?
- Nixpkgs is the right starting point for any team that has already decided to use the Nix package manager or NixOS. The repository is actively maintained, with a push on 2025-09-25, and the current stable release is NixOS 26.05.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 4 days ago.
- What is it written in?
- Mainly Nix, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Two Things in One Repository: Package Expressions and a Linux Distribution
Nixpkgs serves two related but distinct purposes. First, it is a collection of over 140,000 software package expressions that tell the Nix package manager how to build software from source in a reproducible way. Second, it implements NixOS, a Linux distribution built on top of those package expressions using a purely-functional configuration model.
The repository description puts both roles in one sentence: Nixpkgs describes how to build tens of thousands of pieces of software and implements a Linux distribution. These two functions are tightly coupled. NixOS is not a separate project that happens to consume Nixpkgs; it is defined inside the same repository, in the nixos/ and modules/ directories.
For engineers who want to use Nix on macOS or a non-NixOS Linux system, Nixpkgs still supplies the package expressions. For engineers who want NixOS specifically, the repository supplies both the packages and the operating system configuration modules. This means a change to a core package expression can affect both standalone Nix users and NixOS users.
Repository Structure: pkgs, modules, nixos, lib, and Flakes
The top-level directory layout reflects the dual purpose of the repository. The pkgs/ directory holds individual package expressions organized by category. The modules/ directory holds NixOS configuration modules. The nixos/ directory holds NixOS-specific tests and installation tooling. The lib/ directory holds shared Nix library functions used throughout the rest of the repository.
At the top level, two entry points exist for different usage patterns. The file default.nix is the traditional entry point used with the nix-env and nix-build command-line tools. The file flake.nix is the newer entry point used with the experimental flakes feature, which many users have adopted as the preferred way to pin and consume Nixpkgs at a specific version.
The .github/ and ci/ directories handle contribution workflow and continuous integration configuration. The maintainers/ directory holds structured data about who is responsible for which packages, used by the contribution tooling to route pull requests.
How Hydra Builds and Distributes Packages
Nixpkgs and NixOS are built and tested by Hydra, the NixOS project's own continuous integration system, running at hydra.nixos.org. Hydra evaluates Nix expressions from the repository, compiles packages, and runs automated tests.
Artifacts that Hydra successfully builds are published to a binary cache at cache.nixos.org. When a Nix user runs a package install, Nix checks this cache first. If the pre-built binary is present, it downloads the binary instead of compiling from source. This is the mechanism that makes Nixpkgs practical at scale: most users never compile most packages themselves.
Hydra runs separate build pipelines for the unstable/master branch and for stable releases. The README links directly to the Hydra job pages for NixOS 26.05 and for unstable/master. Teams that need to verify whether a specific package is currently building correctly on a given channel can check those Hydra pages directly.
The NixOS Foundation, a nonprofit organization, maintains the infrastructure that runs Hydra and the binary cache. The README lists SEPA bank transfers and Open Collective as donation paths for teams or individuals who want to support that infrastructure.
Channels: Unstable, Stable, and the 26.05 Release
Nix distributes Nixpkgs to users through channels. A channel is a versioned snapshot of Nixpkgs expressions that Hydra has successfully built and tested. The README documents two active channel types.
The unstable channel tracks the master branch of the repository. It receives updates continuously and contains the newest versions of packages, but it is not subject to the freeze and stabilization process that stable releases go through. Teams who need recent package versions and can accept occasional breakage use the unstable channel.
The stable release channel is a named release, currently NixOS 26.05. The 26.05 label indicates the year and month of the release: this is the release from May 2026. Stable releases receive security backports and critical fixes but not major version upgrades. Teams who need reproducibility and stability over long deployments use the stable channel.
The relationship between nixpkgs unstable and nixpkgs stable is not the same as unstable versus stable in distributions like Debian. Both channels are built and tested by Hydra before packages are distributed; the difference is in how frequently they update and whether package versions are frozen.
Getting Started: Using the NixOS and Nixpkgs Manuals
The README does not include command-line install steps for Nixpkgs or NixOS. It points to three separate manuals for different audiences.
The NixOS Manual covers how to install, configure, and maintain NixOS as a Linux distribution. It is the entry point for engineers who want to run NixOS on a machine or virtual machine.
The Nixpkgs Manual covers contributing to Nixpkgs and using programming-language-specific Nix expressions. It is the entry point for engineers who want to add a package, maintain existing packages, or use Nixpkgs with a specific language ecosystem such as Python, Rust, or Haskell.
The Nix Package Manager Manual covers writing Nix expressions and using the nix command-line tools. It is the reference for engineers who want to understand the expression language that all Nixpkgs build definitions are written in.
All three manuals are linked from the README and hosted at nixos.org. The Nix expression language is not covered by any of these three manuals in a tutorial-style introduction; the community-written resource Nix Pills, listed in the search questions for this project, serves as a walkthrough of the fundamentals.
Contributing at Scale to a 140,000-Package Repository
The README describes Nixpkgs as one of the most active projects on GitHub. The contributing workflow is documented in CONTRIBUTING.md at the repository root and covers how to add new packages, update existing ones, and write NixOS modules.
Contributions go through GitHub Issues and Pull Requests. The volume of open issues and pull requests reflects the scope of maintaining tens of thousands of packages across a Linux distribution. The GitHub Insights page is linked from the README as a way to get a sense of activity.
The maintainers/ directory holds structured data mapping packages to their maintainers. This data is used by tooling to assign reviewers to pull requests. A package without a listed maintainer may sit without review for longer than one with active ownership.
Packaging guidelines for teams who need to ship Nixpkgs through OS distributions are linked from the Nixpkgs Manual. The process for substantial changes to the project, such as architectural decisions, goes through a formal RFC process in the NixOS/rfcs repository.
License Complexity: MIT for Expressions, Varied for Packages
The Nixpkgs repository is licensed under the MIT License. The README includes an explicit note that this MIT license does not apply to the packages built by Nixpkgs. The MIT license covers the Nix expressions, build scripts, and NixOS module configuration files in the repository. It does not cover the software those expressions compile.
Patches included in Nixpkgs may be derivative works of the packages they apply to, and are therefore covered by those packages' licenses, not by MIT. The README calls this out specifically.
In practice, this means that running nix-env -i to install a package from Nixpkgs installs software under the upstream software's own license, not under MIT. Teams with license compliance requirements for distributed software need to evaluate each package's upstream license separately. Nixpkgs does include license metadata per package, accessible through the Nix expression for each package, but automated compliance tooling is not documented in the README.
Editorial conclusion
Nixpkgs is the right starting point for any team that has already decided to use the Nix package manager or NixOS. The repository is actively maintained, with a push on 2025-09-25, and the current stable release is NixOS 26.05. Teams evaluating Nix for the first time should read the NixOS Manual and Nix Package Manager Manual before contributing, because the Nix expression language and the purely-functional build model carry a learning curve that is steeper than traditional package managers. The MIT license applies to the Nix expressions and build scripts in the repository, not to the software those expressions build; each package is covered by its own upstream license.
Frequently asked questions
What are nixpkgs?
Nixpkgs is a GitHub repository that contains over 140,000 software package expressions for the Nix package manager and also implements the NixOS Linux distribution. The package expressions describe how to build software reproducibly from source; the Hydra CI system builds them and publishes binaries to cache.nixos.org.
What is the difference between nixpkgs master and unstable channels?
The master branch is the live development branch of the repository. The unstable channel is a Nix channel built from master: it contains the most recent package versions but updates continuously. Both are distinct from the stable release channel (currently 26.05), which is a named release that receives only security backports and critical fixes.
how to use nixpkgs
The README points to the Nixpkgs Manual at nixos.org/nixpkgs/manual for instructions on contributing to Nixpkgs and using language-specific Nix expressions, and to the Nix Package Manager Manual for writing Nix expressions and using the nix command-line tools.