Initial release | June 15, 2003 |
---|---|
Stable release | 2.19.2[1]
/ November 29, 2023 |
Repository | |
Written in | C++ |
Platform | Linux, Unix-like |
Type | Package management |
License | LGPL |
Website | nixos |
Nix is a cross-platform package manager that uses a deployment model where software is installed into unique directories generated through cryptographic hashes. It is also the name of the tool's programming language. A package's hash takes into account the dependencies, which is claimed to eliminate dependency hell,[2] as an alternative to the typical solution of installing multiple versions of dependencies at the same time. This package management model advertises more reliable, reproducible, and portable packages.[3][4]
Nix packages are defined through a lazy functional programming language specifically designed for package management. Dependencies are tracked directly in this language through an intermediate format called "derivations". A Nix environment keeps track of references automatically, which allows unused packages to be garbage collected 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. This also enables multiple users to safely install software on the same system without administrator privileges.
Nix has full support for Linux and macOS and can safely be installed side by side with an existing package manager.
Nix is used for software packaging and distribution in CERN's LHCb experiment.[5]
NixOS
NixOS[6] is a Linux distribution using Nix for managing software in the system, including the Linux kernel.[7]
Nixpkgs
Nixpkgs is the package repository built upon the Nix package manager. According to Repology, as of March 2023 it contains more than 80,000 packages[8] and has a higher number of up-to-date packages than any other package repository.[9] Architectures supported by Nixpkgs are x86_64-linux, aarch64-linux, x86_64-darwin and aarch64-darwin. Packages for these architectures are regularly built, using a continuous integration service called Hydra,[10] and the results of these builds are uploaded to a public binary cache.[11] When Nix installs a package, it checks this cache and downloads the package from there instead of building it locally.
Nixpkgs is developed in a single git repository on GitHub.[12] Beside packages, it also contains the source code for NixOS.
See also
- GNU Guix: another declarative package manager, using GNU Guile for configuration and customization
- Maak: a build automation utility similar to make, designed to build complex software systems
- Runbook automation
References
- ↑ "Release 2.15.2 · NixOS/Nix". GitHub.
- ↑ Prins, Pjotr; Suresh, Jeeva; Dolstra, Eelco (22 December 2008). "Nix fixes dependency hell on all Linux distributions". Linux.com. Retrieved 11 July 2023.
- ↑ Dolstra, Eelco; de Jonge, Merijn; Visser, Eelco (November 2004). "Nix: A Safe and Policy-Free System for Software Deployment" (PDF). LISA '04: Proceedings of the 18th USENIX Conference on System Administration. pp. 79–92. Retrieved 11 July 2023.
- ↑ Dolstra, Eelco (2006). The Purely Functional Software Deployment Model (PDF) (Ph.D.). Utrecht University. Retrieved 11 July 2023.
- ↑ Burr, Chris; Clemencic, Marco; Couturier, Ben (2018). "Software packaging and distribution for LHCb using Nix" (PDF).
- ↑ "Nix & NixOS | Reproducible builds and deployments". nixos.org.
- ↑ Dolstra, Eelco; Löh, Andres; Pierron, Nicolas (September 2008). NixOS: A Purely Functional Linux Distribution (PDF). ICFP 2008: 13th ACM SIGPLAN International Conference on Functional Programming. pp. 367–378.
- ↑ "Nixpkgs unstable repository information - Repology".
- ↑ "Repository statistics - Repology".
- ↑ "RFC 0046 - Platform Support Tiers". GitHub.
- ↑ "NixOS official binary cache".
- ↑ "Nixpkgs github repository". GitHub.
External links
- Official website
- Nixpkgs GitHub repository
- Debian developer criticism (2008)
- Purely Functional Configuration Management with Nix and NixOS, InfoQ, 2014
- My NixOS Desktop Flow, Xe Iaso, 2020