Original author(s) | Eelco Dolstra |
---|---|
Initial release | June 15, 2003 |
Stable release | |
Repository | |
Written in | C++, [2] Perl, [2] shell script, [2] Nix, [2] make, [2] Autoconf, [2] Rust, [2] C, [2] XML [2] |
Platform | Linux, Darwin, FreeBSD, [3] OpenBSD [4] |
Type | purely functional package manager, free and open-source software, implementation of a programming language, reference implementation, interpreter |
License | GNU Lesser General Public License, version 2.1 [5] |
Website | nixos |
Nix is a cross-platform package manager for Unix-like systems, and a tool to instantiate and manage those systems, invented in 2003 [6] by Eelco Dolstra.
The Nix package manager employs a model in which software packages are each installed into unique directories with immutable contents. These directory names correspond to cryptographic hashes that take into account all dependencies of a package, including other packages managed by Nix. As a result, Nix package names are content-identifying since packages with the same name will have had the same inputs and the same build platform, and therefore the same build result. [7]
Package recipes for Nix are written in the purpose-built "Nix language", a declarative, purely functional, lazily evaluated, dynamically typed programming language. [8] Distinguishing features of the Nix language are strings with "context", string interpolation, first-class file system paths, and "indented strings", which in combination allow concisely expressing dependencies between file system data when specifying the contents of new files.
Dependencies between files, as declared in the Nix language, are automatically tracked and persisted in the "Nix store". [9] New files in the Nix store are created through "derivations". A derivation is a persistent data structure that specifies an executable, arguments and environment variables for its invocation (see execve
), and other files to be read from the Nix store. The executable is then run in a sandbox that prohibits access to anything but the explicitly specified input files and only allows writing to the designated output path. Nix preserves dependency information in output files by scanning for the distinctive hashes used for package directory names. [7]
Automatic reference tracking ensures integrity of packages, even when they are transferred across machines. It also enables garbage collection of unused packages when no other package depends on them. At the cost of greater storage requirements, all upgrades in Nix are guaranteed to be both atomic and capable of efficient rollback. Unique directory names allow installing many packages with differing versions of shared libraries, and is claimed to eliminate so-called dependency hell. [10] This also lets multiple users safely install software on the same system without administrator privileges. As a result, the Nix package management and deployment model advertises more reliable, reproducible, and portable packages. [7] [11]
Nix has full support for Linux, macOS, and WSL, and can safely be installed side-by-side with another package manager.
Nixpkgs is the package repository built upon the Nix package manager. According to Repology , as of July 2024 it contains more than 110,000 packages [12] and has a higher number of up-to-date packages than any other package repository. [13] Operating systems supported by Nixpkgs are primarily Linux and Darwin, with some support for Windows and BSD variants. Supported CPU architectures include 64-bit x86 and ARM. Packages for these architectures are built regularly, using a continuous integration service called Hydra, [14] and the results of these builds are uploaded to a public binary cache. [15] When Nix installs a package, it checks this cache and downloads the binary package to avoid building it locally.
Nixpkgs is developed in a single Git repository on GitHub. [16] Beside packages, it also contains the source code for NixOS.
NixOS [17] is a Linux distribution that uses Nix for managing the entire system configuration, including the Linux kernel. [18]
Nix is used for software packaging and distribution in CERN's LHCb experiment. [19] Nix underlies the distributed software development platforms Replit [20] and Google IDX. [21]
In 2021, a reimplementation by the name Tvix was announced, [22] with the goals of modularity, full compatibility with Nixpkgs, and improved evaluator performance. As of 2024, Tvix has an evaluator [23] and a store implementation, [24] though the authors do not consider the project yet stable or ready for use in production. [25] [ non-primary source needed ] Tvix is written primarily in Rust. [26]
In 2024, a team of volunteers released the first version of Lix, [27] [ non-primary source needed ] a fork of Nix focused on correctness and compatibility that uses the Meson build automation system. The project intends to gradually rewrite parts of the code in Rust. [27]
Irssi is an Internet Relay Chat (IRC) client program for Linux, FreeBSD, macOS and Microsoft Windows. It was originally written by Timo Sirainen, and released under the terms of the GNU GPL-2.0-or-later in January 1999.
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
Gentoo Linux is a Linux distribution built using the Portage package management system. Unlike a binary software distribution, the source code is compiled locally according to the user's preferences and is often optimized for the specific type of computer. Precompiled binaries are available for some packages. Gentoo runs on a wide variety of processor architectures.
Advanced package tool, or APT, is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian and Debian-based Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg
is used to install, remove, and provide information about .deb packages.
Portage is a package management system originally created for and used by Gentoo Linux and also by ChromeOS, Calculate, and Funtoo Linux among others. Portage is based on the concept of ports collections. Gentoo is sometimes referred to as a meta-distribution due to the extreme flexibility of Portage, which makes it operating-system-independent. The Gentoo/Alt project was concerned with using Portage to manage other operating systems, such as BSDs, macOS and Solaris. The most notable of these implementations is the Gentoo/FreeBSD project.
Arch Linux is an independently developed x86-64 general-purpose Linux distribution that strives to provide the latest stable versions of most software by following a rolling-release model. The default installation is intentionally minimal, and is configured by the user during installation so they may add only what they require.
Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages.
Ports collections are the sets of makefiles and patches provided by the BSD-based operating systems, FreeBSD, NetBSD, and OpenBSD, as a simple method of installing software or creating binary packages. They are usually the base of a package management system, with ports handling package creation and additional tools managing package removal, upgrade, and other tasks. In addition to the BSDs, a few Linux distributions have implemented similar infrastructure, including Gentoo's Portage, Arch's Arch Build System (ABS), CRUX's Ports and Void Linux's Templates.
This is a comparison of notable free and open-source configuration management software, suitable for tasks like server configuration, orchestration and infrastructure as code typically performed by a system administrator.
ZYpp is a package manager engine that powers Linux applications like YaST, Zypper and the implementation of PackageKit for openSUSE and SUSE Linux Enterprise. Unlike some more basic package managers, it provides a satisfiability solver to compute package dependencies. It is a free and open-source software project sponsored by SUSE and licensed under the terms of the GNU General Public License v2 or later. ZYpp is implemented mostly in the programming language C++.
RPM Package Manager (RPM) is a free and open-source package management system. The name RPM refers to the .rpm
file format and the package manager program itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base.
NixOS is a free and open source Linux distribution based on the Nix package manager. NixOS uses an immutable design and an atomic update model. Its use of a declarative configuration system allows reproducibility and portability.
GNU Guix is a functional cross-platform package manager and a tool to instantiate and manage Unix-like operating systems, based on the Nix package manager. Configuration and package recipes are written in Guile Scheme. GNU Guix is the default package manager of the GNU Guix System distribution.
git-annex is a distributed file synchronization system written in Haskell. It aims to solve the problem of sharing and synchronizing collections of large files independent from a commercial service or even a central server.
Void Linux is an independent Linux distribution that uses the X Binary Package System (XBPS) package manager, which was designed and implemented from scratch, and the runit init system. Excluding binary kernel blobs, a base install is composed entirely of free software.
Snap is a software packaging and deployment system developed by Canonical for operating systems that use the Linux kernel and the systemd init system. The packages, called snaps, and the tool for using them, snapd, work across a range of Linux distributions and allow upstream software developers to distribute their applications directly to users. Snaps are self-contained applications running in a sandbox with mediated access to the host system. Snap was originally released for cloud applications but was later ported to also work for Internet of Things devices and desktop applications.
Flatpak is a utility for software deployment and package management for Linux. It provides a sandbox environment in which users can run application software in (partial) isolation from the rest of the system. Flatpak was known as xdg-app until 2016.