Nix package manager
Encyclopedia
Nix is a package manager for computer systems. Like RPM
RPM Package Manager
RPM Package Manager is a package management system. The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself...

, apt
Advanced Packaging Tool
The Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software on the Debian GNU/Linux distribution and its variants...

 and many other package managers
Package management system
In software, a package management system, also called package manager, is a collection of software tools to automate the process of installing, upgrading, configuring, and removing software packages for a computer's operating system in a consistent manner...

, it is able to control the installation of packages, or named and versioned groups of files, such as software applications or their associated configuration data.
Nix packages are configured using a lazy
Lazy evaluation
In programming language theory, lazy evaluation or call-by-need is an evaluation strategy which delays the evaluation of an expression until the value of this is actually required and which also avoids repeated evaluations...

, pure-functional
Purely functional
Purely functional is a term in computing used to describe algorithms, data structures or programming languages that exclude destructive modifications...

 language especially designed for this purpose; shell scripts or any other external program (such as Make) may be used to build packages from source code. The purely functional nature of the system enables very precise dependency tracking; for example, a binary package has a dependency on the corresponding source package, on the compiler, and on other packages that the build requires. Cryptographic hashes
Cryptographic hash function
A cryptographic hash function is a deterministic procedure that takes an arbitrary block of data and returns a fixed-size bit string, the hash value, such that an accidental or intentional change to the data will change the hash value...

 determine the exact build and run-time dependencies of every package, and each source or binary package is represented by such a hash. As a result, binary package repositories are a transparent optimization of the basic operation of the package manager (similar to a "cache" of packages indexed by a cryptographic hash).

Dependencies are resolved by a system functionally equivalent to static linking, in that versions of software being depended on by a package are not removed until no package is dependent on them. This can lead to greater storage needs, but makes all upgrades safe (guaranteed not to break existing applications) and atomic. It also permits multiple versions of any package, including parametrized packages such as a program with and without a certain feature, to coexist with no interference.

Nix depends upon having its own directory structure for installing the packages. All packages are installed in sub-directories of the nix directory. In naming the folders, different versions of a package are identified by prepending the hash to the package name.

Nix can be used, with some caveats, as a package manager on top of an existing operating system, such as another GNU/Linux distribution. It may also be used to maintain any kind of file configurations, such as server setups, in addition to software packages in the strict sense.

NixOS

NixOS is an experimental GNU/Linux distribution
Linux distribution
A Linux distribution is a member of the family of Unix-like operating systems built on top of the Linux kernel. Such distributions are operating systems including a large collection of software applications such as word processors, spreadsheets, media players, and database applications...

 using Nix consistently for every piece of software in the system.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK