Skip to content

Guide · Open source

How to use nixpkgs: install, clone and get started

Updated · written with AI from the project's own documentation and checked against our catalogue data

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. This guide explains what you need before starting, how to get a copy of the repository, and where to find the official manuals and community help. By the end you will know which parts of the project matter for your goal, whether that is using packages, running NixOS, or contributing.

NixpkgsNixOS/nixpkgs · ★ 26.7k · MIT

Quick start

  1. 1Check your prerequisites. Confirm you have the Nix package manager or a NixOS installation. The source lists these as the requirements.
  2. 2Install Git if needed. Git is required for the clone command in the README.
  3. 3Clone the repository. Run git clone https://github.com/NixOS/nixpkgs to get a local copy of the Nix expressions.
  4. 4Read the matching manual. Use the NixOS Manual for the operating system or the Nix Package Manager Manual for packages.
  5. 5Check build status when needed. Look at Hydra results to see whether packages built and passed tests.
  6. 6Ask for help or contribute. Use the Discourse forum, Matrix chat or wiki for questions, and GitHub for contributions.

What nixpkgs is and what you need first

Nixpkgs is the package collection for the Nix ecosystem. The project's README describes it as the core repository of Nix, and it is what Nix uses to find and build software.

Nixpkgs has two prerequisites according to the source: the Nix package manager, or a NixOS installation. If you only want packages on another Linux system, install Nix first. If you want the whole operating system, NixOS is the route.

  • Nix package manager: lets you install packages from the collection.
  • NixOS: a purely-functional Linux distribution built on nixpkgs.
  • Git: needed for the clone command shown below.

Get a copy of the nixpkgs repository

The README's install instruction is to clone the repository from GitHub. Cloning gives you the Nix expressions that describe how each package is built.

The source does not give further setup steps for using the clone, so check the manuals linked below for how to use it with Nix and NixOS.

git clone https://github.com/NixOS/nixpkgs

Read the official manuals

The project publishes three manuals. The NixOS Manual covers how to install, configure, and maintain NixOS. The Nixpkgs Manual covers contributing to Nixpkgs and using programming-language-specific Nix expressions. The Nix Package Manager Manual explains how to write Nix expressions and how to use the Nix command line tools.

Start with the NixOS Manual if you are installing the operating system, and with the Nix Package Manager Manual if you only want packages.

  • NixOS Manual: install, configure and maintain NixOS.
  • Nixpkgs Manual: contributing and language-specific expressions.
  • Nix Package Manager Manual: writing Nix expressions and using the Nix CLI.

Check build and test results with Hydra

Nixpkgs and NixOS are built and tested by the Hydra continuous integration system. Successful artifacts are published to the cache at cache.nixos.org, and when build and test criteria are met, the expressions are distributed through Nix channels.

You can look at the Hydra pages for unstable/master and for the NixOS 26.05 release to see continuous package builds and test results.

  • Continuous builds for unstable/master and the NixOS 26.05 release are listed on hydra.nixos.org.
  • Successful builds are published to cache.nixos.org.
  • Channels distribute expressions once build and test criteria pass.

Get help from the community

The README lists a Discourse forum, a Matrix chat, and an official wiki. A community-maintained page lists other ways to get in touch, including Discord, Telegram and IRC.

  • Discourse Forum: discourse.nixos.org
  • Matrix Chat: the nixos space on matrix.to
  • Official wiki: wiki.nixos.org

Contribute to nixpkgs

Community contributions are welcome through GitHub Issues and Pull Requests. The README points to the contributing guide in the repository for details. The GitHub Insights page shows recent project activity.

The project is large, so the README suggests seeing thousands of open issues and pull requests in the context of the scope: tens of thousands of pieces of software.

  • Open an issue or pull request on GitHub.
  • Read CONTRIBUTING.md in the repository first.

What people use it for

  • Install packages from a large collection through one package manager.
  • Run NixOS as your operating system.
  • Keep tools reproducible across machines, as the project describes its package set.
  • Help maintain packages or the distribution by contributing on GitHub.

Frequently asked questions

Is nixpkgs free to use?

Nixpkgs is licensed under the MIT License, as stated in the README. The license applies to the files in the repository, not to the packages built from it, which are covered by their own licenses.

What do I need before using nixpkgs?

The source lists two prerequisites: the Nix package manager, or a NixOS installation. Git is also needed for the clone command in the README.

Is nixpkgs the same as NixOS?

No. Nixpkgs is the package collection, and it also implements NixOS, a purely-functional Linux distribution. You can use the packages with Nix, or use the full NixOS system.

Is nixpkgs easy for beginners?

The source does not describe a point-and-click installer. It points to the NixOS Manual for installation, configuration and maintenance, so expect to read documentation.

How does nixpkgs compare to Homebrew, Guix, Flatpak or Spack?

The source lists these as comparable projects but does not compare them in detail. Check each project's own documentation to decide which fits your needs.

Where can I get help if something breaks?

The README lists a Discourse forum, a Matrix chat and an official wiki. A community-maintained list also includes Discord, Telegram and IRC.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Nixpkgs suits Linux users and developers who want a large, reproducible package set, and people who want to run NixOS or contribute. It is less suitable if you want a simple installer or just one small app, since the scope is very broad and setup is documented in manuals.

Install options & downloads