Nixpkgs: The Package Collection That Defines NixOS
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 the central repository for Nix and NixOS, containing over 140,000 package definitions. This review examines its architecture, usage, and limitations for engineers considering adoption.
- Who is it for?
- Adopt Nixpkgs if you are already using Nix or NixOS and need a reproducible, purely functional package set. Do not adopt it if you want a traditional package manager with binary-only distribution or if you are unwilling to learn the Nix language.
- 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 received new commits within the last day.
- What is it written in?
- Mainly Nix, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- NixOS/nixpkgs26,827 ★ · +1,264
| Repository | 2026-07-28 | 2026-11-14 |
|---|---|---|
| NixOS/nixpkgs | 25.6k | 26.8k |
1,264 Stars in the last 109 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The Problem Nixpkgs Solves
Traditional package managers like apt or yum install software into a shared system state, where dependencies can conflict and upgrades are not easily reversible. Nixpkgs addresses this by describing how to build software in a purely functional way. Each package is built from a Nix expression that specifies its inputs, and the build result is stored in a content-addressed store. This means that the same expression always produces the same result, and multiple versions of a package can coexist without conflict. Nixpkgs is the collection of these expressions, and it also implements NixOS, a Linux distribution built on this model. The intended audience is engineers who need reproducible builds, atomic upgrades, and the ability to roll back changes. It is also for system administrators who want to manage entire system configurations declaratively.
How Nixpkgs Works: Expressions, Store, and Hydra
The repository contains tens of thousands of Nix expressions, each defining how to build a piece of software. These expressions are written in the Nix language, which is a pure functional language. The build process is deterministic: given the same inputs, the same output is produced. Nixpkgs also includes NixOS modules, which are Nix expressions that describe system configuration, such as services, users, and networking. The continuous integration system, Hydra, builds and tests the packages. Successful builds are published to a binary cache at cache.nixos.org, so users do not have to compile everything from source. The Nix package manager uses this cache to download pre-built binaries when available. The repository is the single source of truth for both package recipes and the NixOS distribution.
Getting Started: Installing and Using Nixpkgs
To use Nixpkgs, you first install the Nix package manager, which is available from nixos.org. The README links to the Nix Package Manager Manual for instructions on writing Nix expressions and using the command line tools. Once Nix is installed, you can install packages from Nixpkgs using the nix-env command, or you can define a shell environment with nix-shell. For NixOS, you install the distribution and then edit a configuration file, typically /etc/nixos/configuration.nix. This file uses Nix expressions to declare the system configuration, and you apply changes with the nixos-rebuild command. The NixOS Manual provides detailed instructions. The README also mentions Nix channels, which are used to distribute Nixpkgs expressions. You can subscribe to a channel like nixpkgs-unstable or nixos-26.05 to get updates. The exact commands are not detailed in the README, but the manuals are the primary reference.
Limitations and Failure Modes
One limitation is the learning curve. The Nix language is a functional language, which is unfamiliar to many developers. Writing custom package expressions requires understanding the language and the Nixpkgs conventions. Another limitation is that the binary cache may not have pre-built binaries for your specific platform or configuration, especially if you are using a less common architecture or if you have custom options. In that case, you must build from source, which can be slow. The README notes that Nixpkgs is among the most active projects on GitHub, with thousands of open issues and pull requests. This activity can be overwhelming for newcomers and may slow down pull request reviews. A failure mode is that a package may be broken in the unstable channel, but the release channels are more stable. If you need a package that is not in Nixpkgs, you may need to write your own expression, which is a significant effort.
Alternatives: Guix and Traditional Package Managers
The most direct alternative is GNU Guix, which also uses a purely functional package management model. Guix is based on the Nix store concept but uses the Guile Scheme language for expressions. The key difference is the language: Nixpkgs uses Nix, while Guix uses Scheme. This affects how you write package definitions and system configurations. If you prefer Lisp-like syntax, Guix may be more approachable. Traditional package managers like apt or dnf are alternatives but with a different approach: they manage a shared system state and do not provide the same reproducibility or rollback guarantees. They are easier to learn and have a larger set of pre-built binaries for common platforms, but they lack the functional purity that Nixpkgs offers. The choice depends on whether you value reproducibility over simplicity.
Maintenance and Upgrade Cost
Nixpkgs is a continuously evolving repository. The README mentions continuous builds for the unstable/master branch and for release branches like release-26.05. Upgrading NixOS involves changing the channel or the configuration file and running nixos-rebuild switch. The cost is that you need to track changes in Nixpkgs, especially if you maintain custom expressions. The NixOS project has a formal RFC process, kept in the separate Nix RFCs repository, for substantial changes, which adds governance but also overhead. The license is MIT, but it applies only to the repository files, not to the packages built by Nixpkgs. Packages retain their own licenses, and patches included in Nixpkgs may be derivative works with their own licensing. This means you must check the license of each package you use, not just the repository license.
Editorial conclusion
Adopt Nixpkgs if you are already using Nix or NixOS and need a reproducible, purely functional package set. Do not adopt it if you want a traditional package manager with binary-only distribution or if you are unwilling to learn the Nix language. Before adopting, verify that the packages you need are present and that your team can handle the learning curve and the large, active but sometimes chaotic contribution process. The repository is the foundation of NixOS, so its maintenance and upgrade path are tied to the NixOS release cycle, with continuous builds from Hydra.
Frequently asked questions
What are nixpkgs?
Nixpkgs is a collection of over 140,000 software packages that can be installed with the Nix package manager, and it also implements NixOS, a purely-functional Linux distribution. The repository holds the build descriptions as Nix expressions, not the built software, and it publishes no GitHub releases.
Are Nix packages safe?
Safety here has two separate meanings. For build integrity, artifacts are published to the public cache at cache.nixos.org only when Hydra build and test criteria are met. For licensing, the MIT licence covers only the files in the repository, not the packages built from them, and those artifacts carry the licences of their respective packages.
What is the difference between nixpkgs master and unstable channels?
The README treats unstable and master as one line, built and tested continuously under a jobset named trunk-combined, and treats a numbered release such as 26.05 as a separate target with its own build and test jobset. Expressions reach you through Nix channels once those criteria are met, so the choice is between a moving development line and a numbered release.
how to use nixpkgs-unstable
The unstable line is continuously built and tested by Hydra, and artifacts that pass are published to the binary cache at cache.nixos.org, which is what makes installing from it fast. Pin a production machine to a numbered release such as 26.05 instead, and check that release's own test results rather than assuming the development line is healthy.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nixos-nixpkgs)Star history chart for your README
[](https://hysenlabs.com/projects/nixos-nixpkgs)Was this useful?