Nix (package manager)

from Wikipedia, the free encyclopedia

Nix is a package manager for Unix systems and can be compared to RPM , APT and many other package managers. He is able to control the installation of packages (named and versioned groups of files, e.g. software or its configuration data). In contrast to almost all other package managers, Nix is ​​intended for use in various distributions and operating systems (currently Linux and OS X). Nix only manages deterministic compilations. The development of Nix is ​​driven by the Nix Foundation, a foundation under Dutch law. This also organizes the NixCon, a conference on Nix.

Nothing

Nix packages are configured using a " delayed evaluation ", purely functional language that was specially designed for this purpose. Shell scripts and other external programs (e.g. make) can be used to compile packages. This language allows precise dependency monitoring. Cryptographic hash values indicate the exact build and runtime dependencies for each package and each source code or binary package is represented by such a hash, whereby repositories represent a cache of packages indexed by a cryptographic hash.

Dependencies are resolved by a system functionality that is similar to hard linking . A software version is not removed until no more packages refer to it. While this can lead to greater memory consumption, it makes all upgrades safe (a guarantee that no existing application will lose functionality) and atomic. It also allows several versions of any package, even if they differ only in terms of parameters, to operate side by side without interference.

Nix is ​​based on its own folder structure for installing packages. Each package is installed in a subdirectory of the Nix directory. When naming the folders, different versions of a package are prefixed with hash values ​​to the package name so that they can be identified.

Nix can be used as a package manager on an existing operating system, such as a Linux distribution, with a few caveats. Nix can also be used to maintain any kind of file configuration, such as B. Server configurations in addition to package management in the narrow sense.

In contrast to conventional package managers, Nix supports so-called profiles. A profile is an environment in which certain packages are installed. Profiles make it possible to quickly switch between different versions of installed software. Every user (not even an administrator) can create profiles and install them in this software.

Nothing can also work with packages from other package managers, such as B. Bower or Cabal .

Software in the Nix environment

NixOS is a Linux distribution that Nix uses to manage the software. This runs consistently through the distribution. Unlike GuixSD, NixOS uses systemd .

GNU Guix The GNU Project announced in November 2012, the first release of GNU Guix (just as pronounced as "geeks"), a functional package manager, 'is based on principles and Nix among other Guile provides Scheme APIs to. This project was started in June 2012 by Ludovic Courtès, one of the "GNU Guile hackers". GNU Guix is ​​mainly used in the Linux distribution "GuixSD".

Hydra is a continuous integration software that can automatically build and test nix packages.

NixOps is a DevOps tool which allows systems described by Nix expressions e.g. B. to deploy on Amazon EC2 .

See also

Web links

Individual evidence

  1. Prins, P., Suresh, J. and Dolstra, E., “Nix fixes dependency hell on all Linux distributions,” linux.com, December 22, 2008
  2. Dolstra, E., de Jonge, M. and Visser, E. "Nix: A Safe and Policy-Free System for Software Deployment." ( Memento of the original from March 5, 2012 in the Internet Archive ) Info: The archive link became automatic used and not yet tested. Please check the original and archive link according to the instructions and then remove this notice. (PDF) @1@ 2Template: Webachiv / IABot / www.st.ewi.tudelft.nl
  3. Dolstra, E. The Purely Functional Software Deployment Model. ( Memento of the original from March 5, 2012 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. (PDF) @1@ 2Template: Webachiv / IABot / www.st.ewi.tudelft.nl
  4. https://nixos.org/nixos/foundation.html
  5. - ( Memento of the original from August 1, 2017 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / conf.nixos.org
  6. https://nixos.org/wiki/Bower2nix
  7. nixos.org
  8. Dolstra, E. and Löh, A. "NixOS: A Purely Functional Linux Distribution." ( Memento of the original from March 5, 2012 in the Internet Archive ) Info: The archive link was automatically inserted and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. (PDF) @1@ 2Template: Webachiv / IABot / www.st.ewi.tudelft.nl
  9. ^ Courtès, Ludovic (November 23, 2012).
  10. ^ Stallman, Richard (June 5, 2012).
  11. https://nixos.org/hydra/